Created
June 23, 2011 18:23
-
-
Save jwoertink/1043186 to your computer and use it in GitHub Desktop.
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
| Jeremy-Woertinks-MacBook-Pro-2:bootcamp jeremywoertink$ irb | |
| ruby-1.9.2-p180 :001 > module Bootcamp | |
| ruby-1.9.2-p180 :002?> def test | |
| ruby-1.9.2-p180 :003?> puts "yes" | |
| ruby-1.9.2-p180 :004?> end | |
| ruby-1.9.2-p180 :005?> end | |
| => nil | |
| ruby-1.9.2-p180 :006 > module Bootcamp | |
| ruby-1.9.2-p180 :007?> class Something | |
| ruby-1.9.2-p180 :008?> def two | |
| ruby-1.9.2-p180 :009?> test | |
| ruby-1.9.2-p180 :010?> end | |
| ruby-1.9.2-p180 :011?> end | |
| ruby-1.9.2-p180 :012?> end | |
| => nil | |
| ruby-1.9.2-p180 :013 > Bootcamp | |
| => Bootcamp | |
| ruby-1.9.2-p180 :014 > Bootcamp::Something.new.two | |
| ArgumentError: wrong number of arguments (0 for 2..3) | |
| from (irb):9:in `test' | |
| from (irb):9:in `two' | |
| from (irb):14 | |
| from /Users/jeremywoertink/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment