Class: Brainzz::ChannelListParams

Inherits:
Object
  • Object
show all
Defined in:
lib/brainzz/params/channel_list_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, content_owner_id = nil) ⇒ ChannelListParams

Returns a new instance of ChannelListParams.



9
10
11
12
13
14
15
# File 'lib/brainzz/params/channel_list_params.rb', line 9

def initialize(options={}, content_owner_id=nil)
  @parts = options.fetch(:parts, default_channel_parts)
  @content_owner_id = content_owner_id
  @managed_by_me = options.fetch(:managed_by_me, false)
  @mine = options.fetch(:mine, false)
  @next_page_token   = options.fetch(:next_page_token, nil)
end

Instance Attribute Details

#content_owner_idObject (readonly)

Returns the value of attribute content_owner_id.



4
5
6
# File 'lib/brainzz/params/channel_list_params.rb', line 4

def content_owner_id
  @content_owner_id
end

#managed_by_meObject (readonly)

Returns the value of attribute managed_by_me.



5
6
7
# File 'lib/brainzz/params/channel_list_params.rb', line 5

def managed_by_me
  @managed_by_me
end

#mineObject (readonly)

Returns the value of attribute mine.



6
7
8
# File 'lib/brainzz/params/channel_list_params.rb', line 6

def mine
  @mine
end

#next_page_tokenObject (readonly)

Returns the value of attribute next_page_token.



7
8
9
# File 'lib/brainzz/params/channel_list_params.rb', line 7

def next_page_token
  @next_page_token
end

#partsObject (readonly)

Returns the value of attribute parts.



3
4
5
# File 'lib/brainzz/params/channel_list_params.rb', line 3

def parts
  @parts
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/brainzz/params/channel_list_params.rb', line 17

def valid?
  !!(@parts && !@parts.empty?)
end