Class: Yt::Collections::Base
- Inherits:
-
Object
- Object
- Yt::Collections::Base
- Includes:
- Actions::DeleteAll, Actions::Insert, Actions::List
- Defined in:
- lib/yt/collections/base.rb
Direct Known Subclasses
Annotations, Authentications, Claims, ContentDetails, ContentOwners, Ids, LiveStreamingDetails, Policies, Ratings, References, Reports, Resources, ResumableSessions, Snippets, StatisticsSets, Statuses, Subscriptions, UserInfos, Videos, ViewerPercentages
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #where(conditions = {}) ⇒ Object
Methods included from Actions::List
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( = {}) @parent = [:parent] @auth = [: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 27 |
# File 'lib/yt/collections/base.rb', line 22 def where(conditions = {}) self.tap do @items = [] @where_params = conditions end end |