Sha256: 436c3ce340ef100152e6a4751605006e9d8bfb96f9c087fec8393a7c2b4bdc10

Contents?: true

Size: 511 Bytes

Versions: 2

Compression:

Stored size: 511 Bytes

Contents

module Rumblr
  
  class User < Resource
    attr_reader :email, :password, :can_upload_video, :can_upload_aiff, :vimeo_login_url, :can_upload_audio
    
    def tumblelogs
      instance_variable_get(:@tumblelogs) || []
    end
    
    def primary_tumblelog
      self.tumblelogs.find { |log| log.is_primary }
    end
    
    class << self
      def login(attrs={})
        email, password = attrs[:email], attrs[:password]
        Client.instance.authenticate(email,password)
      end
    end

  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jamescallmebrent-rumblr-0.0.0 lib/rumblr/user.rb
jamescallmebrent-rumblr-0.0.1 lib/rumblr/user.rb