Last active
December 24, 2015 14:39
-
-
Save cupakromer/6814650 to your computer and use it in GitHub Desktop.
This file contains 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
# Ruby's World | |
# Runs this code | |
puts self # => main | |
# Runs this code | |
module ChangeMyWorld | |
# The Worls is now changed | |
# Runs this code | |
puts self # => ChangeMyWorld | |
# Runs this creation of a method | |
def self.do_something | |
# Doesn't run this code right now | |
# => saves this stuff to do later | |
end | |
end | |
# Exits the world | |
# Runs this code | |
puts self # => main | |
# Runs this code | |
ChangeMyWorld.do_something # => Now runs the code saved as "do_something" in the world ChangeMyWorld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment