Skip to content

Instantly share code, notes, and snippets.

@tsevdos
Last active Feb 1, 2016
Embed
What would you like to do?
Extending Class methods with Module Mixins
# module
module Findable
def find_by_name(name)
# find something
end
end
# Class
class Klass
# class stuff
class << self
include Findable
end
end
Klass.find_by_name('John')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment