Class: CloudFormation::FunctionGenerator
- Inherits:
-
Object
- Object
- CloudFormation::FunctionGenerator
- Defined in:
- lib/svrless/generators/cloud_formation/function_generator.rb
Overview
Responsible for generating a hash which will eventually look like this:
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#klass ⇒ Object
Returns the value of attribute klass.
Instance Method Summary collapse
- #hash_representation ⇒ Object
-
#initialize(klass:, actions:) ⇒ FunctionGenerator
constructor
A new instance of FunctionGenerator.
Constructor Details
#initialize(klass:, actions:) ⇒ FunctionGenerator
Returns a new instance of FunctionGenerator.
12 13 14 15 |
# File 'lib/svrless/generators/cloud_formation/function_generator.rb', line 12 def initialize(klass:, actions:) @klass = klass @actions = actions end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
10 11 12 |
# File 'lib/svrless/generators/cloud_formation/function_generator.rb', line 10 def actions @actions end |
#klass ⇒ Object
Returns the value of attribute klass.
10 11 12 |
# File 'lib/svrless/generators/cloud_formation/function_generator.rb', line 10 def klass @klass end |
Instance Method Details
#hash_representation ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/svrless/generators/cloud_formation/function_generator.rb', line 17 def hash_representation { "#{plural_klass_name}_controller": { type: "AWS::Serverless::Function", properties: properties_hash } } end |