Skip to content

Instantly share code, notes, and snippets.

/test.rb Secret

Created July 9, 2015 20:35
Show Gist options
  • Save anonymous/a7ef72300465d0faf60f to your computer and use it in GitHub Desktop.
Save anonymous/a7ef72300465d0faf60f to your computer and use it in GitHub Desktop.
module MyModule
def self.included(base)
base.extend ClassMethods
puts base.state_machine_class # Raises NotImplementedError
end
module ClassMethods
def state_machine_class
raise NotImplementedError
end
end
end
class MyModel
include MyModule
def self.state_machine_class
StateMachineClass
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment