Sha256: 119919b4f74a252e6ddd42007743021d42b6574cd7c06fc18cc99dded6b5d7ac

Contents?: true

Size: 753 Bytes

Versions: 15

Compression:

Stored size: 753 Bytes

Contents

# frozen_string_literal: true

require "securerandom"

module Meibo
  class Builder
    module RoleBuilder
      extend BaseBuilder

      def self.builder_attribute_names
        %i[builder user organization user_profile]
      end

      def initialize(builder:, user:, organization:, sourced_id: SecureRandom.uuid, user_profile: nil, **kw)
        super(
          sourced_id: sourced_id,
          user_sourced_id: user.sourced_id,
          org_sourced_id: organization.sourced_id,
          user_profile_sourced_id: user_profile&.sourced_id,
          **kw
        )
        @builder = builder
        @user = user
        @organization = organization
        @user_profile = user_profile
        builder.roles << self
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/builder/role_builder.rb
meibo-0.27.0 lib/meibo/builder/role_builder.rb
meibo-0.26.0 lib/meibo/builder/role_builder.rb
meibo-0.25.3 lib/meibo/builder/role_builder.rb
meibo-0.25.2 lib/meibo/builder/role_builder.rb
meibo-0.25.1 lib/meibo/builder/role_builder.rb
meibo-0.25.0 lib/meibo/builder/role_builder.rb
meibo-0.24.0 lib/meibo/builder/role_builder.rb
meibo-0.23.0 lib/meibo/builder/role_builder.rb
meibo-0.22.0 lib/meibo/builder/role_builder.rb
meibo-0.21.0 lib/meibo/builder/role_builder.rb
meibo-0.20.0 lib/meibo/builder/role_builder.rb
meibo-0.19.0 lib/meibo/builder/role_builder.rb
meibo-0.18.0 lib/meibo/builder/role_builder.rb
meibo-0.17.0 lib/meibo/builder/role_builder.rb