Class: Awspec::Type::RdsDBParameters

Inherits:
Object
  • Object
show all
Defined in:
lib/awspec/type/rds_db_parameter_group.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ RdsDBParameters

Thanks to AWS for creating parameters names like ‘rds.accepted_password_auth_method’, which would be caught as method ‘rds’ by method_missing in RdsDbParameterGroup class, this class was created See github.com/k1LoW/awspec/issues/527 for more details



22
23
24
# File 'lib/awspec/type/rds_db_parameter_group.rb', line 22

def initialize(params)
  @params = params
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



30
31
32
33
34
# File 'lib/awspec/type/rds_db_parameter_group.rb', line 30

def method_missing(name)
  param_name = name.to_sym
  return @params[param_name] if @params.include?(param_name)
  raise InvalidRdsDbParameter, name
end

Instance Method Details

#to_sObject



26
27
28
# File 'lib/awspec/type/rds_db_parameter_group.rb', line 26

def to_s
  return "RdsDBParameters = #{@params}"
end