Class: Auth::Lh::SessionResponse
- Inherits:
-
Object
- Object
- Auth::Lh::SessionResponse
- Defined in:
- lib/auth/lh/session_response.rb
Instance Attribute Summary collapse
-
#login_url ⇒ Object
Returns the value of attribute login_url.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#success ⇒ Object
Returns the value of attribute success.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SessionResponse
constructor
A new instance of SessionResponse.
Constructor Details
#initialize(attributes = {}) ⇒ SessionResponse
Returns a new instance of SessionResponse.
6 7 8 9 10 11 12 13 14 |
# File 'lib/auth/lh/session_response.rb', line 6 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
#login_url ⇒ Object
Returns the value of attribute login_url.
4 5 6 |
# File 'lib/auth/lh/session_response.rb', line 4 def login_url @login_url end |
#reason ⇒ Object
Returns the value of attribute reason.
4 5 6 |
# File 'lib/auth/lh/session_response.rb', line 4 def reason @reason end |
#success ⇒ Object
Returns the value of attribute success.
4 5 6 |
# File 'lib/auth/lh/session_response.rb', line 4 def success @success end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/auth/lh/session_response.rb', line 4 def user @user end |