Exception: DuoRuby::ReplyError
- Inherits:
-
StandardError
- Object
- StandardError
- DuoRuby::ReplyError
- Defined in:
- lib/duoruby/reply_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(params) ⇒ ReplyError
constructor
A new instance of ReplyError.
Constructor Details
#initialize(params) ⇒ ReplyError
Returns a new instance of ReplyError.
7 8 9 10 11 12 |
# File 'lib/duoruby/reply_error.rb', line 7 def initialize(params) @params = params.transform_keys(&:to_sym) @code = @params[:code].to_s @details = @params[:details] super(@params[:message].to_s) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/duoruby/reply_error.rb', line 5 def code @code end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
5 6 7 |
# File 'lib/duoruby/reply_error.rb', line 5 def details @details end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/duoruby/reply_error.rb', line 5 def params @params end |