Exception: Moonrope::Errors::RequestError
- Defined in:
- lib/moonrope/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options) ⇒ RequestError
constructor
A new instance of RequestError.
- #status ⇒ Object
Constructor Details
#initialize(options) ⇒ RequestError
Returns a new instance of RequestError.
12 13 14 |
# File 'lib/moonrope/errors.rb', line 12 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/moonrope/errors.rb', line 10 def @options end |
Instance Method Details
#data ⇒ Object
20 21 22 |
# File 'lib/moonrope/errors.rb', line 20 def data {:message => @options} end |
#status ⇒ Object
16 17 18 |
# File 'lib/moonrope/errors.rb', line 16 def status @options.is_a?(Hash) ? @options[:status] || 'error' : 'error' end |