Class: Postscript::Model::Operators::Dictionary::Load

Inherits:
Postscript::Model::Operator show all
Defined in:
lib/postscript/model/operators/dictionary.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(key:) ⇒ Load

Returns a new instance of Load.



49
50
51
52
# File 'lib/postscript/model/operators/dictionary.rb', line 49

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

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



48
49
50
# File 'lib/postscript/model/operators/dictionary.rb', line 48

def key
  @key
end

Class Method Details

.from_operands(stack) ⇒ Object



53
54
55
# File 'lib/postscript/model/operators/dictionary.rb', line 53

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