Class: AWS::CloudFormation::Helper
- Inherits:
-
Object
- Object
- AWS::CloudFormation::Helper
- Defined in:
- lib/aws_cloudformation_helper.rb,
lib/aws_cloudformation_helper/event.rb,
lib/aws_cloudformation_helper/logger.rb,
lib/aws_cloudformation_helper/version.rb,
lib/aws_cloudformation_helper/response.rb
Overview
Main module
Defined Under Namespace
Modules: Version Classes: Event, Logger, Response
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(lambda_class, event, context) ⇒ Helper
constructor
A new instance of Helper.
- #logger ⇒ Object
Constructor Details
#initialize(lambda_class, event, context) ⇒ Helper
Returns a new instance of Helper.
15 16 17 18 19 20 21 22 23 |
# File 'lib/aws_cloudformation_helper.rb', line 15 def initialize(lambda_class, event, context) # Ruby context object: https://docs.aws.amazon.com/lambda/latest/dg/ruby-context.html @context = context # Initialize event object @event = Event.new(event, lambda_class.method(:create), lambda_class.method(:delete), lambda_class.method(:update)) Event.instance = @event end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
13 14 15 |
# File 'lib/aws_cloudformation_helper.rb', line 13 def context @context end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
12 13 14 |
# File 'lib/aws_cloudformation_helper.rb', line 12 def event @event end |
Class Method Details
.logger ⇒ Object
25 26 27 28 |
# File 'lib/aws_cloudformation_helper.rb', line 25 def self.logger @logger ||= Logger.new @logger end |
Instance Method Details
#logger ⇒ Object
30 31 32 |
# File 'lib/aws_cloudformation_helper.rb', line 30 def logger self.class.logger end |