lib/woyo/world/way.rb in woyo-world-0.0.6 vs lib/woyo/world/way.rb in woyo-world-0.0.7

- old
+ new

@@ -2,14 +2,16 @@ module Woyo class Way < WorldObject - attributes :description, name: lambda { |this| this.id.to_s.capitalize } + def initialize_object + super + attribute :going + exclusion :passable, :closed, :open # defaults to closed: true + end - group! :passable, :closed, :open # defaults to closed: true - def world from ? from.world : nil end def close! @@ -44,10 +46,9 @@ else raise "Symbol required, but #{arg.class} : '#{arg}' given." end end - attribute :going def go { go: open?, going: self.going } end