Module: Meibo::Builder::OrganizationBuilder
- Extended by:
- BaseBuilder
- Defined in:
- lib/meibo/builder/organization_builder.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build_course(**kw) ⇒ Object
- #build_role(**kw) ⇒ Object
- #build_user(**kw) ⇒ Object
- #initialize(builder:, sourced_id: SecureRandom.uuid, parent: nil, **kw) ⇒ Object
Methods included from BaseBuilder
Class Method Details
.builder_attribute_names ⇒ Object
10 11 12 |
# File 'lib/meibo/builder/organization_builder.rb', line 10 def self.builder_attribute_names %i[builder parent] end |
Instance Method Details
#build_course(**kw) ⇒ Object
21 22 23 |
# File 'lib/meibo/builder/organization_builder.rb', line 21 def build_course(**kw) builder.build_course(organization: self, **kw) end |
#build_role(**kw) ⇒ Object
29 30 31 |
# File 'lib/meibo/builder/organization_builder.rb', line 29 def build_role(**kw) builder.build_role(organization: self, **kw) end |
#build_user(**kw) ⇒ Object
25 26 27 |
# File 'lib/meibo/builder/organization_builder.rb', line 25 def build_user(**kw) builder.build_user(primary_organization: self, **kw) end |
#initialize(builder:, sourced_id: SecureRandom.uuid, parent: nil, **kw) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/meibo/builder/organization_builder.rb', line 14 def initialize(builder:, sourced_id: SecureRandom.uuid, parent: nil, **kw) super(sourced_id: sourced_id, parent_sourced_id: parent&.sourced_id, **kw) @builder = builder @parent = parent builder.organizations << self end |