Class: Postscript::Model::Operators::ControlFlow::Stopped

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

Returns a new instance of Stopped.



108
109
110
111
# File 'lib/postscript/model/operators/control_flow.rb', line 108

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



107
108
109
# File 'lib/postscript/model/operators/control_flow.rb', line 107

def body
  @body
end

Class Method Details

.from_operands(stack) ⇒ Object



112
113
114
# File 'lib/postscript/model/operators/control_flow.rb', line 112

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