lib/woyo/world/way.rb in woyo-world-0.0.8 vs lib/woyo/world/way.rb in woyo-world-0.0.9

- old
+ new

@@ -6,12 +6,26 @@ def initialize_object super attribute :going exclusion :passable, :closed, :open # defaults to closed: true + action :go do + describe proc { self.context.going } + #result proc { self.context.passable } + execution do + { + go: open?, + location: open? ? self.to.id : nil + } + end + end end + # def go + # { go: open?, going: self.going } + # end + def world from ? from.world : nil end def close! @@ -46,13 +60,9 @@ else raise "Symbol required, but #{arg.class} : '#{arg}' given." end end - def go - { go: open?, going: self.going } - end - end end