Exception: Layouter::LayoutError

Inherits:
GenericError show all
Defined in:
lib/layouter/errors.rb

Overview

Only raised while laying out, if it is not possible to layout.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dimensionObject (readonly)

Returns the value of attribute dimension.



15
16
17
# File 'lib/layouter/errors.rb', line 15

def dimension
  @dimension
end

#reasonObject (readonly)

Returns the value of attribute reason.



15
16
17
# File 'lib/layouter/errors.rb', line 15

def reason
  @reason
end