Created
June 3, 2013 20:11
-
-
Save bradleyd/5700975 to your computer and use it in GitHub Desktop.
ruby-talk list example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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