Exception: Fontist::Errors::FontError
- Inherits:
-
GeneralError
- Object
- StandardError
- GeneralError
- Fontist::Errors::FontError
- Defined in:
- lib/fontist/errors.rb
Direct Known Subclasses
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.
74 75 76 77 78 79 |
# File 'lib/fontist/errors.rb', line 74 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.
72 73 74 |
# File 'lib/fontist/errors.rb', line 72 def font @font end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
72 73 74 |
# File 'lib/fontist/errors.rb', line 72 def style @style end |
Instance Method Details
#name ⇒ Object
81 82 83 84 85 86 |
# File 'lib/fontist/errors.rb', line 81 def name = [] << "Font name: '#{@font}'" << "Style: '#{@style}'" if @style .join("; ") end |