Created
June 15, 2015 23:53
-
-
Save celeen/81c6d6d28a3f64a3415e to your computer and use it in GitHub Desktop.
Class methods, Instance Methods, and Modules
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
module Action | |
def self.doing_things | |
puts "HI" | |
end | |
def do_a_thing | |
puts "hi" | |
end | |
end | |
class Thing | |
include Action | |
end | |
thing = Thing.new | |
thing.doings_things | |
Thing.doing_things | |
thing.do_a_thing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment