class Bookmark
Attributes
href[RW]
unread[RW]
untagged[RW]
Public Class Methods
is_unread(attribute)
click to toggle source
# File lib/pinup/bookmark.rb, line 10 def self.is_unread(attribute) if attribute == 'yes' true else false end end
is_untagged(attribute)
click to toggle source
# File lib/pinup/bookmark.rb, line 18 def self.is_untagged(attribute) if attribute.strip.empty? true else false end end
new(options = {})
click to toggle source
# File lib/pinup/bookmark.rb, line 4 def initialize(options = {}) @href = options['href'] unless options['href'].nil? @unread = self.class.is_unread(options['toread']) unless options['toread'].nil? @untagged = self.class.is_untagged(options['tags']) unless options['tags'].nil? end
Public Instance Methods
to_s()
click to toggle source
# File lib/pinup/bookmark.rb, line 26 def to_s "<Bookmark: ##{ self.object_id } URL: #{ @href } Unread: #{ self.unread } Untagged: #{ self.untagged }>" end