Class: Postsvg::Model::Operators::Font::Setfont
- Inherits:
-
Postsvg::Model::Operator
- Object
- Postsvg::Model::Operator
- Postsvg::Model::Operators::Font::Setfont
- Defined in:
- lib/postsvg/model/operators/font.rb
Overview
Installs the font dictionary as the current font.
Instance Attribute Summary collapse
-
#font ⇒ Object
readonly
Returns the value of attribute font.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(font:) ⇒ Setfont
constructor
A new instance of Setfont.
Methods inherited from Postsvg::Model::Operator
#accept, #operator?, register_as
Constructor Details
#initialize(font:) ⇒ Setfont
Returns a new instance of Setfont.
46 47 48 49 |
# File 'lib/postsvg/model/operators/font.rb', line 46 def initialize(font:) @font = font freeze end |
Instance Attribute Details
#font ⇒ Object (readonly)
Returns the value of attribute font.
45 46 47 |
# File 'lib/postsvg/model/operators/font.rb', line 45 def font @font end |
Class Method Details
.from_operands(stack) ⇒ Object
50 51 52 |
# File 'lib/postsvg/model/operators/font.rb', line 50 def self.from_operands(stack) new(font: stack.pop) end |