Exception: Fontist::Errors::FontError
- Inherits:
-
GeneralError
- Object
- StandardError
- GeneralError
- Fontist::Errors::FontError
- Defined in:
- lib/fontist/errors.rb
Direct Known Subclasses
ManualFontError, MissingFontError, PlatformMismatchError, UnsupportedFontError
Instance Attribute Summary collapse
-
#font ⇒ Object
readonly
Returns the value of attribute font.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
Instance Method Summary collapse
-
#initialize(msg, font = nil, style = nil) ⇒ FontError
constructor
A new instance of FontError.
- #name ⇒ Object
Constructor Details
#initialize(msg, font = nil, style = nil) ⇒ FontError
Returns a new instance of FontError.
94 95 96 97 98 99 |
# File 'lib/fontist/errors.rb', line 94 def initialize(msg, font = nil, style = nil) @font = font @style = style super(msg) end |
Instance Attribute Details
#font ⇒ Object (readonly)
Returns the value of attribute font.
92 93 94 |
# File 'lib/fontist/errors.rb', line 92 def font @font end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
92 93 94 |
# File 'lib/fontist/errors.rb', line 92 def style @style end |
Instance Method Details
#name ⇒ Object
101 102 103 104 105 106 |
# File 'lib/fontist/errors.rb', line 101 def name = [] << "Font name: '#{@font}'" << "Style: '#{@style}'" if @style .join("; ") end |