Class: CfnDsl::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/cfndsl/rake_task.rb

Overview

Rake Task

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) {|_self| ... } ⇒ RakeTask

Returns a new instance of RakeTask.

Yields:

  • (_self)

Yield Parameters:



11
12
13
14
15
16
17
18
19
20
# File 'lib/cfndsl/rake_task.rb', line 11

def initialize(name = nil)
  yield self if block_given?

  desc 'Generate Cloudformation' unless ::Rake.application.last_description
  task(name || :generate) do |_t, _args|
    cfndsl_opts[:files].each do |opts|
      generate(opts)
    end
  end
end

Instance Attribute Details

#cfndsl_optsObject

Returns the value of attribute cfndsl_opts.



9
10
11
# File 'lib/cfndsl/rake_task.rb', line 9

def cfndsl_opts
  @cfndsl_opts
end