Class: AwsCftTools::Change
- Inherits:
-
Object
- Object
- AwsCftTools::Change
- Extended by:
- Forwardable
- Defined in:
- lib/aws_cft_tools/change.rb
Overview
Represents a change in a changeset.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(change) ⇒ Change
constructor
A new instance of Change.
-
#scopes ⇒ String
A comma-separated list of scopes.
-
#to_narrative ⇒ Hash
Information useful for creating a tabular report.
-
#type ⇒ String
Human readable type of resource being changed.
Constructor Details
#initialize(change) ⇒ Change
Returns a new instance of Change.
13 14 15 |
# File 'lib/aws_cft_tools/change.rb', line 13 def initialize(change) @resource = change.resource_change end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
10 11 12 |
# File 'lib/aws_cft_tools/change.rb', line 10 def resource @resource end |
Instance Method Details
#scopes ⇒ String
Returns a comma-separated list of scopes.
37 38 39 |
# File 'lib/aws_cft_tools/change.rb', line 37 def scopes resource.scope.sort.join(', ') end |
#to_narrative ⇒ Hash
Returns information useful for creating a tabular report.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/aws_cft_tools/change.rb', line 45 def to_narrative { action: action, logical_id: logical_id, physical_id: physical_id, type: type, scopes: scopes, replacement: replacement } end |
#type ⇒ String
Returns human readable type of resource being changed.
29 30 31 |
# File 'lib/aws_cft_tools/change.rb', line 29 def type humanize_camelized(resource.resource_type) end |