Class: Moonshot::Plugins::DynamicTemplate
- Inherits:
-
Object
- Object
- Moonshot::Plugins::DynamicTemplate
- Defined in:
- lib/plugins/dynamic_template.rb
Instance Method Summary collapse
- #cli_hook(parser) ⇒ Object (also: #create_cli_hook, #delete_cli_hook, #update_cli_hook)
-
#initialize(source:, parameters:, destination:) ⇒ DynamicTemplate
constructor
A new instance of DynamicTemplate.
- #run_hook ⇒ Object (also: #setup_create, #setup_update, #setup_delete)
Constructor Details
#initialize(source:, parameters:, destination:) ⇒ DynamicTemplate
Returns a new instance of DynamicTemplate.
6 7 8 9 10 11 12 |
# File 'lib/plugins/dynamic_template.rb', line 6 def initialize(source:, parameters:, destination:) @dynamic_template = ::Moonshot::DynamicTemplate.new( source:, parameters:, destination: ) end |
Instance Method Details
#cli_hook(parser) ⇒ Object Also known as: create_cli_hook, delete_cli_hook, update_cli_hook
18 19 20 21 22 23 |
# File 'lib/plugins/dynamic_template.rb', line 18 def cli_hook(parser) parser.on('--template-file=FILE', 'Override the path to the CloudFormation template.') do |v| @dynamic_template.destination = v Moonshot.config.template_file = v end end |
#run_hook ⇒ Object Also known as: setup_create, setup_update, setup_delete
14 15 16 |
# File 'lib/plugins/dynamic_template.rb', line 14 def run_hook @dynamic_template.process end |