Class: OpenStax::Aws::StackFactory::ParameterDefaultsFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/openstax/aws/stack_factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ ParameterDefaultsFactory

Returns a new instance of ParameterDefaultsFactory.



130
131
132
133
# File 'lib/openstax/aws/stack_factory.rb', line 130

def initialize(context)
  @context = context
  @attributes = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



135
136
137
# File 'lib/openstax/aws/stack_factory.rb', line 135

def method_missing(name, *args, &block)
  attributes[name.to_sym] = args[0] || @context.instance_eval(&block)
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



128
129
130
# File 'lib/openstax/aws/stack_factory.rb', line 128

def attributes
  @attributes
end