Class: Locomotive::Liquid::Drops::ProxyCollection
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Locomotive::Liquid::Drops::ProxyCollection
show all
- Defined in:
- lib/locomotive/liquid/drops/proxy_collection.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ProxyCollection.
7
8
9
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 7
def initialize(collection)
@collection = collection
end
|
Instance Method Details
#all ⇒ Object
31
32
33
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 31
def all
self.collection
end
|
#any ⇒ Object
42
43
44
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 42
def any
self.collection.any?
end
|
#content_type ⇒ Object
46
47
48
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 46
def content_type
end
|
#count ⇒ Object
Also known as:
size, length
27
28
29
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 27
def count
@count ||= self.collection.count
end
|
#each(&block) ⇒ Object
19
20
21
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 19
def each(&block)
self.collection.each(&block)
end
|
#each_with_index(&block) ⇒ Object
23
24
25
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 23
def each_with_index(&block)
self.collection.each_with_index(&block)
end
|
#empty ⇒ Object
38
39
40
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 38
def empty
self.collection.empty?
end
|
#first ⇒ Object
11
12
13
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 11
def first
self.collection.first
end
|
#last ⇒ Object
15
16
17
|
# File 'lib/locomotive/liquid/drops/proxy_collection.rb', line 15
def last
self.collection.last
end
|