Class: Postscript::Model::Operators::Container::Putinterval

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(operand:, start:, source:) ⇒ Putinterval

Returns a new instance of Putinterval.



71
72
73
74
75
76
# File 'lib/postscript/model/operators/container.rb', line 71

def initialize(operand:, start:, source:)
  @operand = operand
  @start = start
  @source = source
  freeze
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



70
71
72
# File 'lib/postscript/model/operators/container.rb', line 70

def operand
  @operand
end

#sourceObject (readonly)

Returns the value of attribute source.



70
71
72
# File 'lib/postscript/model/operators/container.rb', line 70

def source
  @source
end

#startObject (readonly)

Returns the value of attribute start.



70
71
72
# File 'lib/postscript/model/operators/container.rb', line 70

def start
  @start
end

Class Method Details

.from_operands(stack) ⇒ Object



77
78
79
80
81
82
# File 'lib/postscript/model/operators/container.rb', line 77

def self.from_operands(stack)
  source = stack.pop
  start = stack.pop_number.to_i
  coll = stack.pop
  new(operand: coll, start: start, source: source)
end