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



24
25
26
# File 'lib/awspec/type/rds_db_parameter_group.rb', line 24

def initialize(params)
  @params = params
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



32
33
34
35
36
37
# File 'lib/awspec/type/rds_db_parameter_group.rb', line 32

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



28
29
30
# File 'lib/awspec/type/rds_db_parameter_group.rb', line 28

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