-
-
Save ivanacostarubio/4711920 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 MotionModel | |
module Model | |
def save(*) | |
puts "called MM#save" | |
end | |
end | |
end | |
module MotionModel | |
module Paranoid | |
def save(paranoid = false) | |
puts paranoid ? super : "error because it is not valid" | |
end | |
end | |
end | |
class MyModel | |
include MotionModel::Model | |
include MotionModel::Paranoid | |
end | |
model = MyModel.new | |
model.save | |
model.save(true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment