Module: Pixiv::IllustList::WithClient

Includes:
Enumerable, Page::WithClient
Included in:
OwnedIllustList::WithClient
Defined in:
lib/pixiv/illust_list.rb

Instance Attribute Summary

Attributes included from Page::WithClient

#client

Instance Method Summary collapse

Instance Method Details

#each {|illust| ... } ⇒ Object

Yield Parameters:



49
50
51
52
53
54
# File 'lib/pixiv/illust_list.rb', line 49

def each
  illust_hashes.each do |attrs|
    url = attrs.delete(:url)
    yield Illust.lazy_new(attrs) { client.agent.get(url) }
  end
end

#nextIllust?

Returns:



57
58
59
60
# File 'lib/pixiv/illust_list.rb', line 57

def next
  return if last?
  self.class.lazy_new(next_attrs) { client.agent.get(next_url) }
end

#prevObject



62
63
64
65
# File 'lib/pixiv/illust_list.rb', line 62

def prev
  return if first?
  self.class.lazy_new(next_attrs) { client.agent.get(prev_url) }
end