Class: InheritedProofing::UserAttributesFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/inherited_proofing/user_attributes_fetcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth_code:) ⇒ UserAttributesFetcher

Returns a new instance of UserAttributesFetcher.



9
10
11
# File 'lib/inherited_proofing/user_attributes_fetcher.rb', line 9

def initialize(auth_code:)
  @auth_code = auth_code
end

Instance Attribute Details

#auth_codeObject (readonly)

Returns the value of attribute auth_code.



7
8
9
# File 'lib/inherited_proofing/user_attributes_fetcher.rb', line 7

def auth_code
  @auth_code
end

Instance Method Details

#performObject



13
14
15
16
17
18
19
20
# File 'lib/inherited_proofing/user_attributes_fetcher.rb', line 13

def perform
  return mocked_user_attributes if auth_code == mocked_auth_code

  validations
  user_attributes
ensure
  mhv_identity_data&.destroy
end