Class: Prawn::Blank::Appearance
- Inherits:
-
Object
- Object
- Prawn::Blank::Appearance
- Defined in:
- lib/prawn/blank/appearance.rb
Instance Attribute Summary collapse
-
#font ⇒ Object
Returns the value of attribute font.
-
#font_size ⇒ Object
Returns the value of attribute font_size.
-
#font_subset ⇒ Object
Returns the value of attribute font_subset.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Appearance
constructor
A new instance of Appearance.
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Appearance
Returns a new instance of Appearance.
5 6 7 8 9 |
# File 'lib/prawn/blank/appearance.rb', line 5 def initialize(={}) .each do |k,v| self.send "#{k.to_s}=".to_sym,v end end |
Instance Attribute Details
#font ⇒ Object
Returns the value of attribute font.
3 4 5 |
# File 'lib/prawn/blank/appearance.rb', line 3 def font @font end |
#font_size ⇒ Object
Returns the value of attribute font_size.
3 4 5 |
# File 'lib/prawn/blank/appearance.rb', line 3 def font_size @font_size end |
#font_subset ⇒ Object
Returns the value of attribute font_subset.
3 4 5 |
# File 'lib/prawn/blank/appearance.rb', line 3 def font_subset @font_subset end |
Class Method Details
.cast(hsh) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/prawn/blank/appearance.rb', line 11 def self.cast(hsh) if hsh.kind_of? self return hsh else return self.new(hsh) end end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/prawn/blank/appearance.rb', line 19 def to_s Prawn::LiteralString.new "/#{font.identifier_for(0)} #{font_size} Tf" end |