Class: Postscript::Model::Operators::Container::Cvs

Inherits:
Postscript::Model::Operator show all
Defined in:
lib/postscript/model/operators/container.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Postscript::Model::Operator

#accept, #operator?, register_as

Constructor Details

#initialize(value:, target:) ⇒ Cvs

Returns a new instance of Cvs.



172
173
174
175
176
# File 'lib/postscript/model/operators/container.rb', line 172

def initialize(value:, target:)
  @value = value
  @target = target
  freeze
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



171
172
173
# File 'lib/postscript/model/operators/container.rb', line 171

def target
  @target
end

#valueObject (readonly)

Returns the value of attribute value.



171
172
173
# File 'lib/postscript/model/operators/container.rb', line 171

def value
  @value
end

Class Method Details

.from_operands(stack) ⇒ Object



177
178
179
180
181
# File 'lib/postscript/model/operators/container.rb', line 177

def self.from_operands(stack)
  target = stack.pop
  value = stack.pop
  new(value: value, target: target)
end