Class: Postsvg::Model::Operators::Boolean::Or
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Boolean::Or
- Defined in:
- lib/postsvg/model/operators/boolean.rb
Instance Attribute Summary collapse
-
#operand_a ⇒ Object
readonly
Returns the value of attribute operand_a.
-
#operand_b ⇒ Object
readonly
Returns the value of attribute operand_b.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(operand_a:, operand_b:) ⇒ Or
constructor
A new instance of Or.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(operand_a:, operand_b:) ⇒ Or
Returns a new instance of Or.
131 132 133 134 135 |
# File 'lib/postsvg/model/operators/boolean.rb', line 131 def initialize(operand_a:, operand_b:) @operand_a = operand_a @operand_b = operand_b freeze end |
Instance Attribute Details
#operand_a ⇒ Object (readonly)
Returns the value of attribute operand_a.
130 131 132 |
# File 'lib/postsvg/model/operators/boolean.rb', line 130 def operand_a @operand_a end |
#operand_b ⇒ Object (readonly)
Returns the value of attribute operand_b.
130 131 132 |
# File 'lib/postsvg/model/operators/boolean.rb', line 130 def operand_b @operand_b end |
Class Method Details
.from_operands(stack) ⇒ Object
125 126 127 128 129 |
# File 'lib/postsvg/model/operators/boolean.rb', line 125 def self.from_operands(stack) b = stack.pop a = stack.pop new(operand_a: a, operand_b: b) end |