Class: Yt::Collections::Base

Inherits:
Object
  • Object
show all
Includes:
Actions::DeleteAll, Actions::Insert, Actions::List
Defined in:
lib/yt/collections/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Actions::List

#first!

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



13
14
15
16
# File 'lib/yt/collections/base.rb', line 13

def initialize(options = {})
  @parent = options[:parent]
  @auth = options[:auth]
end

Class Method Details

.of(parent) ⇒ Object



18
19
20
# File 'lib/yt/collections/base.rb', line 18

def self.of(parent)
  new parent: parent, auth: parent.auth
end

Instance Method Details

#where(conditions = {}) ⇒ Object



22
23
24
25
26
# File 'lib/yt/collections/base.rb', line 22

def where(conditions = {})
  @items = []
  @extra_params = conditions
  self
end