push
travis-ci
17 of 17 new or added lines in 4 files covered. (100.0%)
3196 of 3536 relevant lines covered (90.38%)
10.0 hits per line
1 |
require 'yt/actions/delete_all'
|
2✔ |
2 |
require 'yt/actions/insert'
|
2✔ |
3 |
require 'yt/actions/list'
|
2✔ |
4 |
require 'yt/errors/request_error'
|
2✔ |
5 |
|
|
6 |
module Yt |
2✔ |
7 |
module Collections |
2✔ |
8 |
class Base |
2✔ |
9 |
include Actions::DeleteAll |
2✔ |
10 |
include Actions::Insert |
2✔ |
11 |
include Actions::List |
2✔ |
12 |
|
|
13 |
def initialize(options = {}) |
2✔ |
14 |
@parent = options[:parent] |
121✔ |
15 |
@auth = options[:auth] |
121✔ |
|
@extra_params = {}
|
121✔ |
|
@extra_parts = []
|
121✔ |
18 |
end
|
|
19 |
|
|
20 |
def self.of(parent) |
2✔ |
21 |
new parent: parent, auth: parent.auth |
118✔ |
22 |
end
|
|
23 |
|
|
24 |
def where(conditions = {}) |
2✔ |
25 |
@items = []
|
20✔ |
26 |
@extra_params = conditions
|
20✔ |
27 |
self
|
20✔ |
28 |
end
|
|
29 |
|
|
|
def include(*parts) |
2✔ |
|
@items = []
|
× |
|
@extra_parts = parts
|
× |
|
self
|
× |
34 |
end
|
|
35 |
end
|
|
36 |
end
|
|
37 |
end
|