Exception: Layouter::LayoutError
- Inherits:
-
GenericError
- Object
- StandardError
- GenericError
- Layouter::LayoutError
- Defined in:
- lib/layouter/errors.rb
Overview
Only raised while laying out, if it is not possible to layout.
Instance Attribute Summary collapse
-
#dimension ⇒ Object
readonly
Returns the value of attribute dimension.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(dimension, reason) ⇒ LayoutError
constructor
A new instance of LayoutError.
Constructor Details
#initialize(dimension, reason) ⇒ LayoutError
Returns a new instance of LayoutError.
17 18 19 20 21 |
# File 'lib/layouter/errors.rb', line 17 def initialize(dimension, reason) @dimension, @reason = dimension, reason msg = "#{dimension.to_s.capitalize} is #{reason.to_s.gsub("_", " ")}" super(msg) end |
Instance Attribute Details
#dimension ⇒ Object (readonly)
Returns the value of attribute dimension.
15 16 17 |
# File 'lib/layouter/errors.rb', line 15 def dimension @dimension end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
15 16 17 |
# File 'lib/layouter/errors.rb', line 15 def reason @reason end |