lib/eco/api/common/people/base_parser.rb in eco-helpers-2.6.4 vs lib/eco/api/common/people/base_parser.rb in eco-helpers-2.7.0
- old
+ new
@@ -1,10 +1,9 @@
module Eco
module API
module Common
module People
-
# @example Example of usage:
# class ExampleParser < Eco::API::Common::People::BaseParser
# def process
# @parsers.define_attribute("example") do |parser|
# parser.def_parser do |str, deps|
@@ -24,10 +23,9 @@
# pparser.serialise("example, 8) # out: "8"
#
# Helper class to inherit from to ease the definition of attribute parsers in a `PersonParser` object,
# mostly used in for configuration loading.
class BaseParser
-
# @param parsers [Eco::API::Common::People::PersonParser] set of attribute parsers/serialisers.
# @param options [Hash] keyword arguments to be used in the `process` method of the child class.
def initialize(parsers, **options)
@parsers = parsers
@options = options