Class: Identisure::MitId::Failed

Inherits:
Object
  • Object
show all
Defined in:
lib/identisure/mit_id.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, error:, ref_id: nil) ⇒ Failed

Returns a new instance of Failed.



119
120
121
# File 'lib/identisure/mit_id.rb', line 119

def initialize(id:, error:, ref_id: nil)
  @id = id; @ref_id = ref_id; @error = error
end

Instance Attribute Details

#error ⇒ Object (readonly)

Returns the value of attribute error.



117
118
119
# File 'lib/identisure/mit_id.rb', line 117

def error
  @error
end

#id ⇒ Object (readonly)

Returns the value of attribute id.



117
118
119
# File 'lib/identisure/mit_id.rb', line 117

def id
  @id
end

#ref_id ⇒ Object (readonly)

Returns the value of attribute ref_id.



117
118
119
# File 'lib/identisure/mit_id.rb', line 117

def ref_id
  @ref_id
end

Class Method Details

.from_json(d) ⇒ Object



124
# File 'lib/identisure/mit_id.rb', line 124

def self.from_json(d) = new(id: d['id'], ref_id: d['refId'], error: d['error'])

Instance Method Details

#deconstruct_keys(_) ⇒ Object



123
# File 'lib/identisure/mit_id.rb', line 123

def deconstruct_keys(_) = { id: @id, ref_id: @ref_id, error: @error }