Class: CognitoIdp::UserInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/cognito_idp/user_info.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ UserInfo

Returns a new instance of UserInfo.



7
8
9
# File 'lib/cognito_idp/user_info.rb', line 7

def initialize(attributes)
  @attributes = OpenStruct.new(attributes)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



11
12
13
14
# File 'lib/cognito_idp/user_info.rb', line 11

def method_missing(method, ...)
  attribute = @attributes.send(method, ...)
  attribute.is_a?(Hash) ? OpenStruct.new(attribute) : attribute
end

Instance Method Details

#respond_to_missing?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/cognito_idp/user_info.rb', line 16

def respond_to_missing?(method, include_private = false)
  true
end