Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Created June 3, 2012 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexspeller/2865142 to your computer and use it in GitHub Desktop.
Save alexspeller/2865142 to your computer and use it in GitHub Desktop.
Ruby method scopes
def option
puts 'hello from option'
end
$ ruby two.rb
hello from option
require './one.rb'
class MyClass
def initialize
option
end
end
MyClass.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment