Class: Postsvg::Visitors::PsVisitor::Font::FontRef

Inherits:
Struct
  • Object
show all
Defined in:
lib/postsvg/visitors/ps_visitor/font.rb

Overview

Tracks the current font for later show. The visitor pushes FontRef value objects onto the stack.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, size:) ⇒ FontRef

Returns a new instance of FontRef.



17
18
19
20
# File 'lib/postsvg/visitors/ps_visitor/font.rb', line 17

def initialize(name:, size:)
  super
  freeze
end

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



16
17
18
# File 'lib/postsvg/visitors/ps_visitor/font.rb', line 16

def name
  @name
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



16
17
18
# File 'lib/postsvg/visitors/ps_visitor/font.rb', line 16

def size
  @size
end