mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-04-27 14:57:44 +00:00
20 lines
464 B
Ruby
20 lines
464 B
Ruby
require 'instapaper/bookmark'
|
|
require 'instapaper/highlight'
|
|
require 'instapaper/user'
|
|
|
|
module Instapaper
|
|
class BookmarkList
|
|
include Virtus.value_object
|
|
|
|
values do
|
|
attribute :user, Instapaper::User
|
|
attribute :bookmarks, Array[Instapaper::Bookmark]
|
|
attribute :highlights, Array[Instapaper::Highlight]
|
|
attribute :delete_ids, Array[Integer]
|
|
end
|
|
|
|
def each
|
|
bookmarks.each { |bookmark| yield(bookmark) }
|
|
end
|
|
end
|
|
end
|