Class: Namarara::EqOp
- Inherits:
-
Object
- Object
- Namarara::EqOp
- Defined in:
- lib/namarara/parser.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #compute ⇒ Object
-
#initialize(lval, rval) ⇒ EqOp
constructor
A new instance of EqOp.
- #to_s ⇒ Object
Constructor Details
#initialize(lval, rval) ⇒ EqOp
Returns a new instance of EqOp.
163 164 165 166 167 168 169 |
# File 'lib/namarara/parser.rb', line 163 def initialize(lval, rval) @errors = [] @errors.concat lval.errors @errors.concat rval.errors @lval = lval @rval = rval end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
161 162 163 |
# File 'lib/namarara/parser.rb', line 161 def errors @errors end |
Instance Method Details
#compute ⇒ Object
171 172 173 |
# File 'lib/namarara/parser.rb', line 171 def compute @lval.value == @rval.value end |
#to_s ⇒ Object
175 176 177 |
# File 'lib/namarara/parser.rb', line 175 def to_s "#{@lval} = #{@rval}" end |