Skip to content

Instantly share code, notes, and snippets.

@monde
Created December 13, 2011 22:33
Show Gist options
  • Save monde/1474236 to your computer and use it in GitHub Desktop.
Save monde/1474236 to your computer and use it in GitHub Desktop.
module Bar
class << self
attr_accessor :foo
end
class Foo
attr_accessor :foo
def initialize
@foo = "foo"
end
end
end
puts Bar.foo
Bar.foo = "bar"
puts Bar.foo
puts Bar::Foo.new.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment