Skip to content

Instantly share code, notes, and snippets.

@celeen
Created June 15, 2015 23:53
Show Gist options
  • Save celeen/81c6d6d28a3f64a3415e to your computer and use it in GitHub Desktop.
Save celeen/81c6d6d28a3f64a3415e to your computer and use it in GitHub Desktop.
Class methods, Instance Methods, and Modules
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