class Markio::Bookmark

Attributes

add_date[RW]
folders[RW]
href[RW]
last_modified[RW]
last_visit[RW]
tags[RW]
title[RW]

Public Class Methods

create(data) click to toggle source
# File lib/deps/markio/bookmark.rb, line 6
def self.create data
  bookmark = new
  bookmark.title = data[:title]
  bookmark.href = data[:href]
  bookmark.add_date = data[:add_date] || DateTime.now
  bookmark.last_visit = data[:add_date]
  bookmark.last_modified = data[:last_modified]
  bookmark.folders = data[:folders] || []
  bookmark.tags = data[:tags] || []
  bookmark
end

Public Instance Methods

==(other) click to toggle source
# File lib/deps/markio/bookmark.rb, line 18
def == other
  unless other.nil? or other.class != self.class
    other.href == href and other.title == title
  end
end