Skip to content

Instantly share code, notes, and snippets.

@bradleyd
Created June 3, 2013 20:11
Show Gist options
  • Select an option

  • Save bradleyd/5700975 to your computer and use it in GitHub Desktop.

Select an option

Save bradleyd/5700975 to your computer and use it in GitHub Desktop.
ruby-talk list example
module FooModule
Foo = :foo
end
=> :foo
>> FooModule.constants
=> [:Foo]
module BarModule
include FooModule
Bar = :bar
end
=> :bar
>> BarModule.constants
=> [:Bar, :Foo]
>> p BarModule::Bar
:bar
module SubBarModule
end
=> nil
>> SubBarModule.constants
=> []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment