Class: ComicVine::ResourceList
Overview
Class container for multiple ComicVine resources
Instance Attribute Summary collapse
- #resource ⇒ Object readonly
Attributes inherited from List
#cvos, #limit, #offset, #page_count, #total_count
Instance Method Summary collapse
-
#initialize(resp, resc) ⇒ ResourceList
constructor
A new instance of ResourceList.
-
#next_page ⇒ Object
(also: #next_page!)
Loads the next page results.
-
#prev_page ⇒ Object
(also: #prev_page!)
Loads the previous page results.
Methods inherited from List
#each, #has_more?, #last, #page, #total_pages
Constructor Details
#initialize(resp, resc) ⇒ ResourceList
Returns a new instance of ResourceList.
67 68 69 70 71 72 |
# File 'lib/comicvine/list.rb', line 67 def initialize(resp, resc) super(resp) @resource = resc @cvos = resp['results'].map { |r| ComicVine::Resource.create_resource(r) } end |
Instance Attribute Details
#resource ⇒ Object (readonly)
65 66 67 |
# File 'lib/comicvine/list.rb', line 65 def resource @resource end |