Class: Postscript::Model::Operators::Boolean::Not
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Boolean::Not
- Defined in:
- lib/postscript/model/operators/boolean.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operand:) ⇒ Not
constructor
A new instance of Not.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand:) ⇒ Not
Returns a new instance of Not.
156 157 158 159 |
# File 'lib/postscript/model/operators/boolean.rb', line 156 def initialize(operand:) @operand = operand freeze end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
155 156 157 |
# File 'lib/postscript/model/operators/boolean.rb', line 155 def operand @operand end |
Class Method Details
.from_operands(stack) ⇒ Object
160 161 162 |
# File 'lib/postscript/model/operators/boolean.rb', line 160 def self.from_operands(stack) new(operand: stack.pop) end |