Exception: U2F::RegistrationError
- Defined in:
- lib/u2f/errors.rb
Constant Summary collapse
- CODES =
{ 1 => "OTHER_ERROR", 2 => "BAD_REQUEST", 3 => "CONFIGURATION_UNSUPPORTED", 4 => "DEVICE_INELIGIBLE", 5 => "TIMEOUT" }
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RegistrationError
constructor
A new instance of RegistrationError.
Constructor Details
#initialize(options = {}) ⇒ RegistrationError
Returns a new instance of RegistrationError.
26 27 28 29 30 |
# File 'lib/u2f/errors.rb', line 26 def initialize( = {}) @code = [:code] = [:message] || "Token returned #{CODES[code]}" super() end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
24 25 26 |
# File 'lib/u2f/errors.rb', line 24 def code @code end |