Exception: AwsLocalConfigParser::NoMatchingProfile

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aws_local_config_parser/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(profile_name:, config_path:) ⇒ NoMatchingProfile

Returns a new instance of NoMatchingProfile.



20
21
22
23
24
# File 'lib/aws_local_config_parser/errors.rb', line 20

def initialize(profile_name:, config_path:)
  @profile_name = profile_name
  @config_path = config_path
  super(msg: message)
end

Instance Attribute Details

#config_pathObject (readonly)

Returns the value of attribute config_path.



18
19
20
# File 'lib/aws_local_config_parser/errors.rb', line 18

def config_path
  @config_path
end

#profile_nameObject (readonly)

Returns the value of attribute profile_name.



18
19
20
# File 'lib/aws_local_config_parser/errors.rb', line 18

def profile_name
  @profile_name
end

Instance Method Details

#messageObject



26
27
28
# File 'lib/aws_local_config_parser/errors.rb', line 26

def message
  "No matching profile, '#{profile_name}', in '#{config_path}'."
end