lib/rumblr/tumblelog.rb in jamescallmebrent-rumblr-0.0.1 vs lib/rumblr/tumblelog.rb in jamescallmebrent-rumblr-0.0.2
- old
+ new
@@ -1,16 +1,21 @@
module Rumblr
class Tumblelog < Resource
attr_reader :name, :timezone, :cname, :title, :url, :avatar_url, :is_primary,
:type, :private_id
+ attr_accessor :user
def posts
return [] unless self.url
log, posts = Client.instance.read(:url => self.url)
return posts
end
+
+ def primary?
+ is_primary == "yes"
+ end
class << self
def find_by_url(url)
log, posts = Client.instance.read(:url => url)
@@ -19,6 +24,6 @@
end
end
-end
\ No newline at end of file
+end