Class: Kimurai::Pipeline
- Inherits:
-
Object
- Object
- Kimurai::Pipeline
- Includes:
- BaseHelper
- Defined in:
- lib/kimurai/pipeline.rb
Defined Under Namespace
Classes: DropItemError
Instance Attribute Summary collapse
-
#spider ⇒ Object
Returns the value of attribute spider.
Class Method Summary collapse
Instance Method Summary collapse
- #logger ⇒ Object
- #name ⇒ Object
- #save_to(path, item, format:, position: true, append: false) ⇒ Object
- #storage ⇒ Object
- #unique?(scope, value) ⇒ Boolean
Instance Attribute Details
#spider ⇒ Object
Returns the value of attribute spider.
9 10 11 |
# File 'lib/kimurai/pipeline.rb', line 9 def spider @spider end |
Class Method Details
.name ⇒ Object
4 5 6 |
# File 'lib/kimurai/pipeline.rb', line 4 def self.name self.to_s.sub(/.*?::/, "").underscore.to_sym end |
Instance Method Details
#logger ⇒ Object
29 30 31 |
# File 'lib/kimurai/pipeline.rb', line 29 def logger spider.logger end |
#name ⇒ Object
11 12 13 |
# File 'lib/kimurai/pipeline.rb', line 11 def name self.class.name end |
#save_to(path, item, format:, position: true, append: false) ⇒ Object
25 26 27 |
# File 'lib/kimurai/pipeline.rb', line 25 def save_to(path, item, format:, position: true, append: false) spider.save_to(path, item, format: format, position: position, append: append) end |
#storage ⇒ Object
17 18 19 |
# File 'lib/kimurai/pipeline.rb', line 17 def storage spider.storage end |
#unique?(scope, value) ⇒ Boolean
21 22 23 |
# File 'lib/kimurai/pipeline.rb', line 21 def unique?(scope, value) spider.unique?(scope, value) end |