Class: Saver

Inherits:
Kimurai::Pipeline show all
Defined in:
lib/kimurai/template/pipelines/saver.rb

Instance Attribute Summary

Attributes inherited from Kimurai::Pipeline

#spider

Instance Method Summary collapse

Methods inherited from Kimurai::Pipeline

#logger, #name, name, #save_to, #storage, #unique?

Instance Method Details

#process_item(item, options: {}) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/kimurai/template/pipelines/saver.rb', line 2

def process_item(item, options: {})
  # Here you can save item to the database, send it to a remote API or
  # simply save item to a file format using `save_to` helper:

  # To get the name of a current spider: `spider.class.name`
  # save_to "db/#{spider.class.name}.json", item, format: :pretty_json

  item
end