Sha256: 1fe876fc9f3a14dd1fdd8fda8e881891e5a75b67639063a2a041f044bd75df3c

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

module Rumblr
  
  class Tumblelog < Resource
    attr_reader :name, :timezone, :cname, :title, :url, :avatar_url, :is_primary, 
                :type, :private_id
    attr_accessor :user

    def posts(options={})
      return [] unless self.url
      options.reverse_merge!(:url => self.url)
      log, posts = Client.instance.read(options)
      return posts
    end

    def primary?
      is_primary == "yes"
    end
    
    class << self
      
      def find_by_url(url)
        log, posts = Client.instance.read(:url => url)
        return log
      end
    
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hexorx-rumblr-0.0.3 lib/rumblr/tumblelog.rb