Class: MSFLVisitors::Nodes::Set

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/msfl_visitors/nodes/set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#accept

Constructor Details

#initialize(nodes) ⇒ Set

Returns a new instance of Set.

Parameters:

  • nodes (Array<MSFL::Nodes::Base>)

    the nodes that the filter surrounds



13
14
15
# File 'lib/msfl_visitors/nodes/set.rb', line 13

def initialize(nodes)
  self.contents = Array(nodes)
end

Instance Attribute Details

#contentsObject

Returns the value of attribute contents.



8
9
10
# File 'lib/msfl_visitors/nodes/set.rb', line 8

def contents
  @contents
end

Instance Method Details

#==(other) ⇒ Object



17
18
19
20
# File 'lib/msfl_visitors/nodes/set.rb', line 17

def ==(other)
  self.class == other.class &&
      contents == other.contents
end