-
-
Save anonymous/a7ef72300465d0faf60f to your computer and use it in GitHub Desktop.
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 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