Class: Postsvg::Model::InvokeProcedure
- Defined in:
- lib/postsvg/model/operators.rb
Overview
A bare name reference resolved to a user-defined procedure via
def. The renderer descends into procedure with the current
context, mirroring how PostScript executes the procedure body.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#procedure ⇒ Object
readonly
Returns the value of attribute procedure.
Instance Method Summary collapse
-
#initialize(name:, procedure:) ⇒ InvokeProcedure
constructor
A new instance of InvokeProcedure.
- #keyword ⇒ Object
- #visit_name ⇒ Object
Methods inherited from Operator
#accept, from_operands, #operator?, register_as
Constructor Details
#initialize(name:, procedure:) ⇒ InvokeProcedure
Returns a new instance of InvokeProcedure.
78 79 80 81 82 |
# File 'lib/postsvg/model/operators.rb', line 78 def initialize(name:, procedure:) @name = name @procedure = procedure freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
76 77 78 |
# File 'lib/postsvg/model/operators.rb', line 76 def name @name end |
#procedure ⇒ Object (readonly)
Returns the value of attribute procedure.
76 77 78 |
# File 'lib/postsvg/model/operators.rb', line 76 def procedure @procedure end |
Instance Method Details
#keyword ⇒ Object
86 |
# File 'lib/postsvg/model/operators.rb', line 86 def keyword = name.to_s |
#visit_name ⇒ Object
84 |
# File 'lib/postsvg/model/operators.rb', line 84 def visit_name = "invoke_procedure" |