Exception: DuoRuby::ReplyError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/duoruby/reply_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/duoruby/reply_error.rb', line 5

def code
  @code
end

#detailsObject (readonly)

Returns the value of attribute details.



5
6
7
# File 'lib/duoruby/reply_error.rb', line 5

def details
  @details
end

#paramsObject (readonly)

Returns the value of attribute params.



5
6
7
# File 'lib/duoruby/reply_error.rb', line 5

def params
  @params
end