Class: Rumblr::User
Instance Attribute Summary collapse
-
#can_upload_aiff ⇒ Object
readonly
Returns the value of attribute can_upload_aiff.
-
#can_upload_audio ⇒ Object
readonly
Returns the value of attribute can_upload_audio.
-
#can_upload_video ⇒ Object
readonly
Returns the value of attribute can_upload_video.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#vimeo_login_url ⇒ Object
readonly
Returns the value of attribute vimeo_login_url.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Rumblr::Resource
Instance Attribute Details
#can_upload_aiff ⇒ Object (readonly)
Returns the value of attribute can_upload_aiff.
4 5 6 |
# File 'lib/rumblr/user.rb', line 4 def can_upload_aiff @can_upload_aiff end |
#can_upload_audio ⇒ Object (readonly)
Returns the value of attribute can_upload_audio.
4 5 6 |
# File 'lib/rumblr/user.rb', line 4 def can_upload_audio @can_upload_audio end |
#can_upload_video ⇒ Object (readonly)
Returns the value of attribute can_upload_video.
4 5 6 |
# File 'lib/rumblr/user.rb', line 4 def can_upload_video @can_upload_video end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/rumblr/user.rb', line 4 def email @email end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
4 5 6 |
# File 'lib/rumblr/user.rb', line 4 def password @password end |
#vimeo_login_url ⇒ Object (readonly)
Returns the value of attribute vimeo_login_url.
4 5 6 |
# File 'lib/rumblr/user.rb', line 4 def vimeo_login_url @vimeo_login_url end |
Class Method Details
.login(attrs = {}) ⇒ Object
19 20 21 22 |
# File 'lib/rumblr/user.rb', line 19 def login(attrs={}) email, password = attrs[:email], attrs[:password] Client.instance.authenticate(email,password) end |
Instance Method Details
#auth ⇒ Object
14 15 16 |
# File 'lib/rumblr/user.rb', line 14 def auth {:email => self.email, :password => self.password} end |
#primary_tumblelog ⇒ Object
10 11 12 |
# File 'lib/rumblr/user.rb', line 10 def primary_tumblelog self.tumblelogs.find { |log| log.primary? } end |
#tumblelogs ⇒ Object
6 7 8 |
# File 'lib/rumblr/user.rb', line 6 def tumblelogs instance_variable_get(:@tumblelogs) || [] end |