Class: Postsvg::Model::Operators::Boolean::Ne

Inherits:
Postsvg::Model::Operator show all
Defined in:
lib/postsvg/model/operators/boolean.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Postsvg::Model::Operator

#accept, #operator?, register_as

Constructor Details

#initialize(operand_a:, operand_b:) ⇒ Ne

Returns a new instance of Ne.



41
42
43
44
45
# File 'lib/postsvg/model/operators/boolean.rb', line 41

def initialize(operand_a:, operand_b:)
  @operand_a = operand_a
  @operand_b = operand_b
  freeze
end

Instance Attribute Details

#operand_aObject (readonly)

Returns the value of attribute operand_a.



40
41
42
# File 'lib/postsvg/model/operators/boolean.rb', line 40

def operand_a
  @operand_a
end

#operand_bObject (readonly)

Returns the value of attribute operand_b.



40
41
42
# File 'lib/postsvg/model/operators/boolean.rb', line 40

def operand_b
  @operand_b
end

Class Method Details

.from_operands(stack) ⇒ Object



35
36
37
38
39
# File 'lib/postsvg/model/operators/boolean.rb', line 35

def self.from_operands(stack)
  b = stack.pop
  a = stack.pop
  new(operand_a: a, operand_b: b)
end