Class: CfnDsl::RakeTask

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

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:



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

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

  desc "Generate Cloudformation" unless ::Rake.application.last_comment
  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.



7
8
9
# File 'lib/cfndsl/rake_task.rb', line 7

def cfndsl_opts
  @cfndsl_opts
end