Class: API::Stack
- Inherits:
-
Object
- Object
- API::Stack
- Defined in:
- lib/quintype/api/stack.rb
Class Method Summary collapse
- .all ⇒ Object
-
.with_stories(params = {}, config = {}) ⇒ Object
TODO filter by stacks.
Class Method Details
.all ⇒ Object
4 5 6 |
# File 'lib/quintype/api/stack.rb', line 4 def all API.config['layout']['stacks'] end |
.with_stories(params = {}, config = {}) ⇒ Object
TODO filter by stacks
8 9 10 11 12 13 14 15 |
# File 'lib/quintype/api/stack.rb', line 8 def with_stories(params={}, config={}) stories_with_stacks = API::Story.find_by_stacks(all, params) stacks = all.map do |stack| stories = stories_with_stacks[stack['story_group'].gsub('-', '_')] stack['stories'] = stories stack end end |