class BookmarkMachine::Bookmark
Attributes
created_at[RW]
description[RW]
folders[RW]
icon[RW]
name[RW]
updated_at[RW]
url[RW]
Public Class Methods
new(url, attrs=nil)
click to toggle source
# File lib/bookmark_machine/bookmark.rb, line 5 def initialize(url, attrs=nil) self.url = url if attrs attrs.each{|key,value| self.send("#{key}=", value)} end self.name ||= "" self.folders ||= [] end
Public Instance Methods
==(other)
click to toggle source
Bookmarks are considered equal if all attributes are equal. Which is probably what you would have excpected.
# File lib/bookmark_machine/bookmark.rb, line 18 def == other url == other.url && name == other.name && created_at == other.created_at && updated_at == other.updated_at && icon == other.icon && folders == other.folders && tags == other.tags && description == other.description end