Class: AuthLh::SessionResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/auth_lh/session_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SessionResponse

Returns a new instance of SessionResponse.



5
6
7
8
9
10
11
12
13
# File 'lib/auth_lh/session_response.rb', line 5

def initialize(attributes={})
  attributes.each do |k,v|
    if k.to_s == 'user'
      self.user = User.new(v) if v.present?
    else
      self.send("#{k}=", v)
    end
  end
end

Instance Attribute Details

#reasonObject

Returns the value of attribute reason.



3
4
5
# File 'lib/auth_lh/session_response.rb', line 3

def reason
  @reason
end

#successObject

Returns the value of attribute success.



3
4
5
# File 'lib/auth_lh/session_response.rb', line 3

def success
  @success
end

#userObject

Returns the value of attribute user.



3
4
5
# File 'lib/auth_lh/session_response.rb', line 3

def user
  @user
end