lib/ustate/query/not.rb in ustate-client-0.0.7 vs lib/ustate/query/not.rb in ustate-client-0.0.8

- old
+ new

@@ -1,15 +1,32 @@ class UState::Query class Not < Node + attr_reader :a def initialize(a) @a = a end + def ==(o) + o.kind_of? Not and @a == o.a + end + def ===(state) not @a === state end + def children + [@a] + end + + def children=(c) + raise ArgumentError unless c.size == 1 + end + def inspect inspect_helper @a + end + + def mass + 1 + @a.mass end end end