Class: Eco::API::Common::People::BaseParser
- Defined in:
- lib/eco/api/common/people/base_parser.rb
Overview
Helper class to inherit from to ease the definition of attribute parsers in a PersonParser
object,
mostly used in for configuration loading.
Instance Method Summary collapse
-
#initialize(parsers, **options) ⇒ BaseParser
constructor
A new instance of BaseParser.
-
#process ⇒ Object
Method to be overriden by the child class.
Constructor Details
#initialize(parsers, **options) ⇒ BaseParser
Returns a new instance of BaseParser.
30 31 32 33 |
# File 'lib/eco/api/common/people/base_parser.rb', line 30 def initialize(parsers, **) @parsers = parsers @options = end |
Instance Method Details
#process ⇒ Object
Note:
this method is called to load the definition of the attribute parser/serializer.
Method to be overriden by the child class.
37 38 39 |
# File 'lib/eco/api/common/people/base_parser.rb', line 37 def process raise "Method needs to be overriden in the child class #{self.class}" end |