Exception: Moneta::Api::RuntimeException
- Defined in:
- lib/moneta/api/runtime_exception.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#detail ⇒ Object
Returns the value of attribute detail.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/moneta/api/runtime_exception.rb', line 4 def code @code end |
#detail ⇒ Object
Returns the value of attribute detail.
4 5 6 |
# File 'lib/moneta/api/runtime_exception.rb', line 4 def detail @detail end |
Instance Method Details
#inspect ⇒ Object
6 7 8 9 10 |
# File 'lib/moneta/api/runtime_exception.rb', line 6 def inspect error = [ "#{ code }: #{ }" ] error += detail.collect { |key, value| "#{ key }: #{ Array(value).join($/) }" } error.join($/) end |
#to_hash ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/moneta/api/runtime_exception.rb', line 12 def to_hash { code: code, message: , detail: detail } end |