Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save daniel-nelson/3577795fcdaba7061747ed6f4700138c to your computer and use it in GitHub Desktop.
Save daniel-nelson/3577795fcdaba7061747ed6f4700138c to your computer and use it in GitHub Desktop.
module ModuleName
include OtherModules
delegate :some_method, to: :some_object
module ClassMethods
def class_method
end
end
def self.included(klass)
class.extend(ClassMethods)
klass.instance_eval do
has_many :...
before_create :some_method
end
end
def instance_method
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment