Class: AwsCftTools::Client::Templates
- Defined in:
- lib/aws_cft_tools/client/templates.rb
Overview
All of the business logic behind direct interaction with the AWS Template sources.
Constant Summary collapse
- DEFAULT_TEMPLATE_DIR =
Default template directory in the project.
'cloudformation/templates/'
- DEFAULT_PARAMETER_DIR =
Default parameters directory in the project.
'cloudformation/parameters/'
- TEMPLATE_FILE_EXTENSIONS =
Default set of file extensions that might contain templates.
%w[.yaml .yml .json .rb].freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options) ⇒ Templates
constructor
A new instance of Templates.
-
#templates ⇒ Object
Lists all templates.
Methods inherited from Base
Constructor Details
#initialize(options) ⇒ Templates
Returns a new instance of Templates.
33 34 35 36 37 38 |
# File 'lib/aws_cft_tools/client/templates.rb', line 33 def initialize() super({ template_dir: DEFAULT_TEMPLATE_DIR, parameter_dir: DEFAULT_PARAMETER_DIR }.merge()) end |
Instance Method Details
#templates ⇒ Object
Lists all templates.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/aws_cft_tools/client/templates.rb', line 45 def templates template_file_root = ([:root] + [:template_dir]).cleanpath filtered_by_region( filtered_by_environment( all_templates( template_file_root ) ) ) end |