Module: Pu::Profile::Concerns::ProfileArguments

Extended by:
ActiveSupport::Concern
Included in:
InstallGenerator, SetupGenerator
Defined in:
lib/generators/pu/profile/concerns/profile_arguments.rb

Instance Method Summary collapse

Instance Method Details

#normalize_argumentsObject

Normalize arguments: if name contains “:”, treat it as an attribute



15
16
17
18
19
20
21
22
23
# File 'lib/generators/pu/profile/concerns/profile_arguments.rb', line 15

def normalize_arguments
  if name.include?(":")
    @profile_attributes = [name, *attributes]
    @profile_name = "Profile"
  else
    @profile_name = name
    @profile_attributes = attributes
  end
end