Class: Rseed::Adapter
- Inherits:
-
Object
- Object
- Rseed::Adapter
- Defined in:
- lib/rseed/adapter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#converter ⇒ Object
Returns the value of attribute converter.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
- #logger ⇒ Object
- #options ⇒ Object
Instance Method Summary collapse
- #converter_attributes ⇒ Object
- #mandatory_attributes ⇒ Object
-
#preprocess ⇒ Object
Dummy process that should be overwritten by other adapters.
- #process {|values, meta| ... } ⇒ Object
Instance Attribute Details
#converter ⇒ Object
Returns the value of attribute converter.
6 7 8 |
# File 'lib/rseed/adapter.rb', line 6 def converter @converter end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/rseed/adapter.rb', line 5 def error @error end |
#logger ⇒ Object
8 9 10 |
# File 'lib/rseed/adapter.rb', line 8 def logger @logger.nil? ? Rseed.logger : @logger end |
#options ⇒ Object
12 13 14 |
# File 'lib/rseed/adapter.rb', line 12 def @options.nil? ? {} : @options end |
Instance Method Details
#converter_attributes ⇒ Object
16 17 18 19 |
# File 'lib/rseed/adapter.rb', line 16 def converter_attributes return [] unless converter converter.class.converter_attributes end |
#mandatory_attributes ⇒ Object
21 22 23 24 |
# File 'lib/rseed/adapter.rb', line 21 def mandatory_attributes return [] unless converter converter.class.mandatory_attributes end |
#preprocess ⇒ Object
Dummy process that should be overwritten by other adapters
27 28 29 |
# File 'lib/rseed/adapter.rb', line 27 def preprocess return true end |
#process {|values, meta| ... } ⇒ Object
31 32 33 34 35 |
# File 'lib/rseed/adapter.rb', line 31 def process &block values = {} = {} yield values, end |