Class: Brainzz::ChannelListWrapper
- Inherits:
-
Object
- Object
- Brainzz::ChannelListWrapper
- Defined in:
- lib/brainzz/models/channel_list_wrapper.rb
Instance Attribute Summary collapse
-
#channel_list_items ⇒ Object
Returns the value of attribute channel_list_items.
-
#next_page_token ⇒ Object
Returns the value of attribute next_page_token.
Instance Method Summary collapse
-
#initialize(channel_list_data = {}) ⇒ ChannelListWrapper
constructor
A new instance of ChannelListWrapper.
- #last_page? ⇒ Boolean
Constructor Details
#initialize(channel_list_data = {}) ⇒ ChannelListWrapper
Returns a new instance of ChannelListWrapper.
5 6 7 8 9 10 11 12 13 |
# File 'lib/brainzz/models/channel_list_wrapper.rb', line 5 def initialize(channel_list_data = {}) @channel_list_items = [] items = channel_list_data['items'] || [] items.each do |channel_list_item| @channel_list_items << Channel.new(channel_list_item) end @next_page_token = channel_list_data['nextPageToken'] end |
Instance Attribute Details
#channel_list_items ⇒ Object
Returns the value of attribute channel_list_items.
3 4 5 |
# File 'lib/brainzz/models/channel_list_wrapper.rb', line 3 def channel_list_items @channel_list_items end |
#next_page_token ⇒ Object
Returns the value of attribute next_page_token.
3 4 5 |
# File 'lib/brainzz/models/channel_list_wrapper.rb', line 3 def next_page_token @next_page_token end |
Instance Method Details
#last_page? ⇒ Boolean
15 16 17 |
# File 'lib/brainzz/models/channel_list_wrapper.rb', line 15 def last_page? !next_page_token end |