Class: Tumblr::User

Inherits:
Object
  • Object
show all
Defined in:
lib/tumblr/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/tumblr/user.rb', line 3

def email
  @email
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/tumblr/user.rb', line 3

def password
  @password
end

#tumblrObject

Returns the value of attribute tumblr.



3
4
5
# File 'lib/tumblr/user.rb', line 3

def tumblr
  @tumblr
end