Class: UState::Query::Not
Instance Attribute Summary collapse
-
#a ⇒ Object
readonly
Returns the value of attribute a.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #===(state) ⇒ Object
- #children ⇒ Object
- #children=(c) ⇒ Object
-
#initialize(a) ⇒ Not
constructor
A new instance of Not.
- #inspect ⇒ Object
- #mass ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(a) ⇒ Not
Returns a new instance of Not.
4 5 6 |
# File 'lib/ustate/query/not.rb', line 4 def initialize(a) @a = a end |
Instance Attribute Details
#a ⇒ Object (readonly)
Returns the value of attribute a.
3 4 5 |
# File 'lib/ustate/query/not.rb', line 3 def a @a end |
Instance Method Details
#==(o) ⇒ Object
8 9 10 |
# File 'lib/ustate/query/not.rb', line 8 def ==(o) o.kind_of? Not and @a == o.a end |
#===(state) ⇒ Object
12 13 14 |
# File 'lib/ustate/query/not.rb', line 12 def ===(state) not @a === state end |
#children ⇒ Object
16 17 18 |
# File 'lib/ustate/query/not.rb', line 16 def children [@a] end |
#children=(c) ⇒ Object
20 21 22 |
# File 'lib/ustate/query/not.rb', line 20 def children=(c) raise ArgumentError unless c.size == 1 end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/ustate/query/not.rb', line 24 def inspect inspect_helper @a end |
#mass ⇒ Object
28 29 30 |
# File 'lib/ustate/query/not.rb', line 28 def mass 1 + @a.mass end |