lib/eco/api/common/people/person_factory.rb in eco-helpers-1.0.13 vs lib/eco/api/common/people/person_factory.rb in eco-helpers-1.0.14
- old
+ new
@@ -1,11 +1,15 @@
module Eco
module API
module Common
module People
+
+ # Helper factory to build `Ecoportal::API::V1::Person` or `Ecoportal::API::Internal::Person` objects
+ # @attr_reader schema [Ecoportal::API::V1::PersonSchema] person schema to be used in this person factory
+ # @attr_reader schema_attrs [Array<String>] _inernal names_ of the schema fields/attributes
class PersonFactory
- attr_reader :schema_attrs
+ attr_reader :schema, :schema_attrs
def initialize(person: {}, schema: {}, account: {}, modifier: Common::People::PersonModifier.new)
@modifier = Common::People::PersonModifier.new(modifier)
@person = person
@account = account