Class: MSFLVisitors::Nodes::NamedValue
- Inherits:
-
Object
- Object
- MSFLVisitors::Nodes::NamedValue
- Defined in:
- lib/msfl_visitors/nodes/named_value.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #accept(visitor) ⇒ Object
-
#initialize(name, value) ⇒ NamedValue
constructor
A new instance of NamedValue.
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
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/msfl_visitors/nodes/named_value.rb', line 4 def name @name end |
#value ⇒ Object
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 |