Class: Postscript::Model::Operators::Font::Findfont
- Inherits:
-
Postscript::Model::Operator
- Object
- Postscript::Model::Operator
- Postscript::Model::Operators::Font::Findfont
- Defined in:
- lib/postscript/model/operators/font.rb
Overview
Pushes a font dictionary onto the stack by name. name is
the PostScript font name (e.g. "Helvetica"). The visitor
pushes a Font value object.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:) ⇒ Findfont
constructor
A new instance of Findfont.
Methods inherited from Postscript::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(name:) ⇒ Findfont
Returns a new instance of Findfont.
17 18 19 20 |
# File 'lib/postscript/model/operators/font.rb', line 17 def initialize(name:) @name = name freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/postscript/model/operators/font.rb', line 16 def name @name end |
Class Method Details
.from_operands(stack) ⇒ Object
21 22 23 |
# File 'lib/postscript/model/operators/font.rb', line 21 def self.from_operands(stack) new(name: stack.pop) end |