Class: Tumblr::User
- Inherits:
-
Object
- Object
- Tumblr::User
- Defined in:
- lib/tumblr/user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
Returns the value of attribute password.
-
#tumblr ⇒ Object
Returns the value of attribute tumblr.
Instance Method Summary collapse
-
#initialize(email, password, authenticate = true) ⇒ User
constructor
creates a User object and authenticates the user through the Tumblr API to get user data.
Constructor Details
#initialize(email, password, authenticate = true) ⇒ User
creates a User object and authenticates the user through the Tumblr API to get user data.
6 7 8 9 10 11 12 |
# File 'lib/tumblr/user.rb', line 6 def initialize(email, password, authenticate = true) self.email = email self.password = password if(authenticate) self.tumblr = Tumblr::Request.authenticate(email,password)['tumblr'] end end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/tumblr/user.rb', line 3 def email @email end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/tumblr/user.rb', line 3 def password @password end |
#tumblr ⇒ Object
Returns the value of attribute tumblr.
3 4 5 |
# File 'lib/tumblr/user.rb', line 3 def tumblr @tumblr end |