Module: Meibo::Builder::RoleBuilder
- Extended by:
- BaseBuilder
- Defined in:
- lib/meibo/builder/role_builder.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from BaseBuilder
Class Method Details
.builder_attribute_names ⇒ Object
10 11 12 |
# File 'lib/meibo/builder/role_builder.rb', line 10 def self.builder_attribute_names %i[builder user organization user_profile] end |
Instance Method Details
#initialize(builder:, user:, organization:, sourced_id: SecureRandom.uuid, user_profile: nil, **kw) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/meibo/builder/role_builder.rb', line 14 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 |