Sha256: 0eea228ad93cae319e6a2f91f26a5b9cdba0b8958b326060f3bcd9dcdeeb6ca5
Contents?: true
Size: 786 Bytes
Versions: 16
Compression:
Stored size: 786 Bytes
Contents
# frozen_string_literal: true require 'securerandom' module Meibo class Builder module OrganizationBuilder extend BaseBuilder def self.builder_attribute_names [:builder, :parent] end 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 def build_course(**kw) builder.build_course(organization: self, **kw) end def build_user(**kw) builder.build_user(primary_organization: self, **kw) end def build_role(**kw) builder.build_role(organization: self, **kw) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems