Class: Postsvg::Model::Operators::Dictionary::Maxlength

Inherits:
Postsvg::Model::Operator show all
Defined in:
lib/postsvg/model/operators/dictionary.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:) ⇒ Maxlength

Returns a new instance of Maxlength.



110
111
112
113
# File 'lib/postsvg/model/operators/dictionary.rb', line 110

def initialize(operand:)
  @operand = operand
  freeze
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



109
110
111
# File 'lib/postsvg/model/operators/dictionary.rb', line 109

def operand
  @operand
end

Class Method Details

.from_operands(stack) ⇒ Object



106
107
108
# File 'lib/postsvg/model/operators/dictionary.rb', line 106

def self.from_operands(stack)
  new(operand: stack.pop)
end