Class: Pandora::User
- Inherits:
-
Object
- Object
- Pandora::User
- Extended by:
- Forwardable
- Includes:
- Client
- Defined in:
- lib/pandora/user.rb
Instance Attribute Summary collapse
-
#partner ⇒ Object
readonly
Returns the value of attribute partner.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#user_auth_token ⇒ Object
readonly
Returns the value of attribute user_auth_token.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(partner, username, password) ⇒ User
constructor
A new instance of User.
- #marshal_dump ⇒ Object
- #marshal_load(objects) ⇒ Object
- #reauthenticate ⇒ Object
- #stations ⇒ Object
Constructor Details
#initialize(partner, username, password) ⇒ User
Returns a new instance of User.
16 17 18 19 |
# File 'lib/pandora/user.rb', line 16 def initialize(partner, username, password) @partner, @username, @password = partner, username, password login end |
Instance Attribute Details
#partner ⇒ Object (readonly)
Returns the value of attribute partner.
10 11 12 |
# File 'lib/pandora/user.rb', line 10 def partner @partner end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
10 11 12 |
# File 'lib/pandora/user.rb', line 10 def password @password end |
#user_auth_token ⇒ Object (readonly)
Returns the value of attribute user_auth_token.
11 12 13 |
# File 'lib/pandora/user.rb', line 11 def user_auth_token @user_auth_token end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
11 12 13 |
# File 'lib/pandora/user.rb', line 11 def user_id @user_id end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
10 11 12 |
# File 'lib/pandora/user.rb', line 10 def username @username end |
Instance Method Details
#marshal_dump ⇒ Object
32 33 34 |
# File 'lib/pandora/user.rb', line 32 def marshal_dump [@partner, @username, @password, @user_auth_token, @user_id] end |
#marshal_load(objects) ⇒ Object
36 37 38 |
# File 'lib/pandora/user.rb', line 36 def marshal_load(objects) @partner, @username, @password, @user_auth_token, @user_id = objects end |
#reauthenticate ⇒ Object
21 22 23 24 |
# File 'lib/pandora/user.rb', line 21 def reauthenticate @partner.reauthenticate login end |