Class: Maglev::FetchCollectionItems

Inherits:
Object
  • Object
show all
Includes:
Injectable
Defined in:
app/services/maglev/fetch_collection_items.rb

Overview

Find item(s) from a collection defined in the Maglev config file. If the id is specified, then look for an item, it not, look for all the items matching a keyword.

Defined Under Namespace

Classes: Item

Instance Method Summary collapse

Instance Method Details

#callObject



18
19
20
21
22
23
24
# File 'app/services/maglev/fetch_collection_items.rb', line 18

def call
  if id
    fetch_item
  else
    fetch_items
  end
end