Class: Namarara::NotOp
- Inherits:
-
Object
- Object
- Namarara::NotOp
- 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(expr) ⇒ NotOp
constructor
A new instance of NotOp.
- #to_s ⇒ Object
Constructor Details
#initialize(expr) ⇒ NotOp
Returns a new instance of NotOp.
145 146 147 148 149 |
# File 'lib/namarara/parser.rb', line 145 def initialize(expr) @errors = [] @errors.concat expr.errors @expr = expr end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
143 144 145 |
# File 'lib/namarara/parser.rb', line 143 def errors @errors end |
Instance Method Details
#compute ⇒ Object
151 152 153 |
# File 'lib/namarara/parser.rb', line 151 def compute !@expr.compute end |
#to_s ⇒ Object
155 156 157 |
# File 'lib/namarara/parser.rb', line 155 def to_s "NOT ( #{@expr} )" end |