Class: ComicVine::CVList
- Inherits:
-
Object
- Object
- ComicVine::CVList
- Includes:
- Enumerable
- Defined in:
- lib/comic_vine/cv_list.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cvos ⇒ Object
readonly
Returns the value of attribute cvos.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(resp) ⇒ CVList
constructor
A new instance of CVList.
- #last ⇒ Object
Constructor Details
#initialize(resp) ⇒ CVList
Returns a new instance of CVList.
10 11 12 13 14 |
# File 'lib/comic_vine/cv_list.rb', line 10 def initialize(resp) @total_count = resp['number_of_total_results'] @offset = resp['offset'] @limit = resp['limit'] end |
Instance Attribute Details
#cvos ⇒ Object (readonly)
Returns the value of attribute cvos.
8 9 10 |
# File 'lib/comic_vine/cv_list.rb', line 8 def cvos @cvos end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
7 8 9 |
# File 'lib/comic_vine/cv_list.rb', line 7 def limit @limit end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
6 7 8 |
# File 'lib/comic_vine/cv_list.rb', line 6 def offset @offset end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
5 6 7 |
# File 'lib/comic_vine/cv_list.rb', line 5 def total_count @total_count end |
Instance Method Details
#each ⇒ Object
16 17 18 |
# File 'lib/comic_vine/cv_list.rb', line 16 def each @cvos.each { |c| yield c } end |
#last ⇒ Object
20 21 22 |
# File 'lib/comic_vine/cv_list.rb', line 20 def last @cvos.last end |