Class: Quintype::API::StoriesResponse
- Inherits:
-
Struct
- Object
- Struct
- Quintype::API::StoriesResponse
show all
- Includes:
- Enumerable
- Defined in:
- lib/quintype/api/story.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
9
10
11
|
# File 'lib/quintype/api/story.rb', line 9
def method_missing(method, *args)
stories.send(method, *args)
end
|
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params
2
3
4
|
# File 'lib/quintype/api/story.rb', line 2
def params
@params
end
|
#stories ⇒ Object
Returns the value of attribute stories
2
3
4
|
# File 'lib/quintype/api/story.rb', line 2
def stories
@stories
end
|
Instance Method Details
#cache_keys(args = {}) ⇒ Object
23
24
25
|
# File 'lib/quintype/api/story.rb', line 23
def cache_keys(args = {})
group_keys(args) + story_keys(args)
end
|
#each ⇒ Object
5
6
7
|
# File 'lib/quintype/api/story.rb', line 5
def each
stories.each { |story| yield story }
end
|
#location ⇒ Object
17
18
19
20
21
|
# File 'lib/quintype/api/story.rb', line 17
def location
return "section-#{params["section-id"]}" if params["section-id"]
return "home" if !params["tag"] && !params["section"] && !params["section-name"]
nil
end
|
#respond_to?(method) ⇒ Boolean
13
14
15
|
# File 'lib/quintype/api/story.rb', line 13
def respond_to?(method)
super || stories.respond_to?(method)
end
|
#to_liquid ⇒ Object
27
28
29
|
# File 'lib/quintype/api/story.rb', line 27
def to_liquid
stories
end
|