Class: MSFLVisitors::Nodes::Iterator
- Defined in:
- lib/msfl_visitors/nodes/iterator.rb
Instance Attribute Summary collapse
-
#set ⇒ Object
Returns the value of attribute set.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(set) ⇒ Iterator
constructor
Be extra defensive, because even after adding previous comment I still tend to make the mistake of passing in an array.
Methods inherited from Base
Constructor Details
#initialize(set) ⇒ Iterator
Be extra defensive, because even after adding previous comment I still tend to make the mistake of passing in an array.
12 13 14 15 16 17 |
# File 'lib/msfl_visitors/nodes/iterator.rb', line 12 def initialize(set) unless set.is_a? MSFLVisitors::Nodes::Set fail ArgumentError, "Argument to Iterator initialize must be instance of MSFLVisitors::Nodes::Set" end self.set = set end |
Instance Attribute Details
#set ⇒ Object
Returns the value of attribute set.
6 7 8 |
# File 'lib/msfl_visitors/nodes/iterator.rb', line 6 def set @set end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 22 |
# File 'lib/msfl_visitors/nodes/iterator.rb', line 19 def ==(other) self.class == other.class && set == other.set end |