Class: Bitly::API::List
- Inherits:
-
Object
- Object
- Bitly::API::List
- Includes:
- Enumerable
- Defined in:
- lib/bitly/api/list.rb
Overview
A base class for lists of API resources. Implements Enumerable.
Direct Known Subclasses
BSD::List, Bitlink::LinkClick::List, Bitlink::List, Bitlink::PaginatedList, ClickMetric::List, ClickMetric::Referrers, Group::List, Organization::List
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(items:, response:) ⇒ List
constructor
A new instance of List.
Constructor Details
#initialize(items:, response:) ⇒ List
Returns a new instance of List.
12 13 14 15 |
# File 'lib/bitly/api/list.rb', line 12 def initialize(items:, response:) @items = items @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/bitly/api/list.rb', line 10 def response @response end |
Instance Method Details
#each ⇒ Object
17 18 19 |
# File 'lib/bitly/api/list.rb', line 17 def each @items.each { |item| yield item } end |