Class: Eco::API::Common::People::DefaultParsers::FreemiumParser
- Inherits:
-
Loaders::Parser
- Object
- Loaders::Base
- Loaders::CaseBase
- Loaders::Parser
- Eco::API::Common::People::DefaultParsers::FreemiumParser
- Defined in:
- lib/eco/api/common/people/default_parsers/freemium_parser.rb
Instance Attribute Summary
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
Methods inherited from Loaders::Parser
active_when_all, active_when_any, #attribute, attribute, dependencies, #initialize, parsing_phase, serializing_phase
Methods inherited from Loaders::CaseBase
Methods inherited from Loaders::Base
<=>, created_at, #initialize, set_created_at!
Methods included from ClassHelpers
#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant
Methods included from Language::AuxiliarLogger
Constructor Details
This class inherits a constructor from Eco::API::Common::Loaders::Parser
Instance Method Details
#parser(hash, deps) ⇒ Object
4 5 6 7 8 |
# File 'lib/eco/api/common/people/default_parsers/freemium_parser.rb', line 4 def parser(hash, deps) value = hash["freemium"] value = value.first if value.is_a?(Array) truthy(value) end |
#serializer(person, deps) ⇒ Object
10 11 12 |
# File 'lib/eco/api/common/people/default_parsers/freemium_parser.rb', line 10 def serializer(person, deps) person.freemium&.to_s end |