Class: Cumuliform::Template
- Inherits:
-
Object
- Object
- Cumuliform::Template
- Includes:
- DSL::Fragments, DSL::Functions, DSL::Helpers, DSL::Import, Output, Sections
- Defined in:
- lib/cumuliform/template.rb,
lib/cumuliform/dsl.rb
Overview
Represents a single CloudFormation template
Instance Method Summary collapse
- #define(&block) ⇒ Object private
- #description(desc) ⇒ Object
- #get_top_level_value(item_name) ⇒ Object
- #transform(transform) ⇒ Object
Methods included from Sections
Methods included from Output
Methods included from DSL::Helpers
Methods included from DSL::Functions
Methods included from DSL::Fragments
#def_fragment, #find_fragment, #fragment
Methods included from DSL::Import
#has_logical_id?, #import, #verify_logical_id!
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cumuliform::DSL::Helpers
Instance Method Details
#define(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 38 |
# File 'lib/cumuliform/template.rb', line 35 def define(&block) instance_exec(&block) self end |
#description(desc) ⇒ Object
25 26 27 |
# File 'lib/cumuliform/template.rb', line 25 def description(desc) @Description = desc end |
#get_top_level_value(item_name) ⇒ Object
29 30 31 32 |
# File 'lib/cumuliform/template.rb', line 29 def get_top_level_value(item_name) raise ArgumentError, "Not an allowed top-level item name" unless TOP_LEVEL.include?(item_name) instance_variable_get(:"@#{item_name}") end |
#transform(transform) ⇒ Object
21 22 23 |
# File 'lib/cumuliform/template.rb', line 21 def transform(transform) @Transform = transform end |