Created
July 21, 2016 18:28
-
-
Save vcolavin/d05fc94e3b6e1c3240e2ea43784801bb 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
class Wolf < AR::Base | |
include Movable | |
end | |
module Movable | |
def some_movement_method | |
# like maybe accessors for Location relation | |
end | |
end | |
module Mover # or Map or something | |
def self.move!(movable) | |
# ... | |
movable.location = some_new_location | |
# ... | |
end | |
end | |
Mover.move!(Wolf.new) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment