Class: Chemtrail::Template
- Inherits:
-
Object
- Object
- Chemtrail::Template
- Defined in:
- lib/chemtrail/template.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(description = nil) ⇒ Template
constructor
A new instance of Template.
- #mappings ⇒ Object
- #outputs ⇒ Object
- #parameters ⇒ Object
- #resources ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(description = nil) ⇒ Template
Returns a new instance of Template.
17 18 19 |
# File 'lib/chemtrail/template.rb', line 17 def initialize(description = nil) @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
15 16 17 |
# File 'lib/chemtrail/template.rb', line 15 def description @description end |
Class Method Details
.inherited(subclass) ⇒ Object
10 11 12 |
# File 'lib/chemtrail/template.rb', line 10 def inherited(subclass) subclass_map[Chemtrail::ClassNameInflector.new(subclass).underscore] = subclass end |
.subclass_map ⇒ Object
6 7 8 |
# File 'lib/chemtrail/template.rb', line 6 def subclass_map @subclass_map ||= {} end |
Instance Method Details
#mappings ⇒ Object
25 26 27 |
# File 'lib/chemtrail/template.rb', line 25 def mappings [] end |
#outputs ⇒ Object
33 34 35 |
# File 'lib/chemtrail/template.rb', line 33 def outputs [] end |
#parameters ⇒ Object
21 22 23 |
# File 'lib/chemtrail/template.rb', line 21 def parameters [] end |
#resources ⇒ Object
29 30 31 |
# File 'lib/chemtrail/template.rb', line 29 def resources [] end |
#to_hash ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/chemtrail/template.rb', line 37 def to_hash version_hash = {"AWSTemplateFormatVersion" => "2010-09-09"} version_hash.merge(description_hash) .merge(parameters_hash) .merge(mappings_hash) .merge(resources_hash) .merge(outputs_hash) end |