Exception: Webflow::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Webflow::Error
- Defined in:
- lib/webflow/error.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #details ⇒ Object
- #details? ⇒ Boolean
-
#initialize(data) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(data) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 |
# File 'lib/webflow/error.rb', line 5 def initialize(data) @data = data = "#{data[:message]}#{": #{Array(details)}" if details?}" super() end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/webflow/error.rb', line 3 def data @data end |
Instance Method Details
#details ⇒ Object
16 17 18 |
# File 'lib/webflow/error.rb', line 16 def details data[:details] end |
#details? ⇒ Boolean
12 13 14 |
# File 'lib/webflow/error.rb', line 12 def details? details && !details.empty? end |