Class: MSFLVisitors::Nodes::NamedValue

Inherits:
Object
  • Object
show all
Defined in:
lib/msfl_visitors/nodes/named_value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ NamedValue

Returns a new instance of NamedValue.



6
7
8
9
# File 'lib/msfl_visitors/nodes/named_value.rb', line 6

def initialize(name, value)
  self.name = name
  self.value = value
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/msfl_visitors/nodes/named_value.rb', line 4

def name
  @name
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/msfl_visitors/nodes/named_value.rb', line 4

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
18
# File 'lib/msfl_visitors/nodes/named_value.rb', line 15

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

#accept(visitor) ⇒ Object



11
12
13
# File 'lib/msfl_visitors/nodes/named_value.rb', line 11

def accept(visitor)
  visitor.visit(self)
end