Class: Tuxedo::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/tuxedo/rake_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) {|_self| ... } ⇒ RakeTask

Returns a new instance of RakeTask.

Yields:

  • (_self)

Yield Parameters:



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/tuxedo/rake_task.rb', line 13

def initialize(*args)
  @name = args.shift || :style
  @cane_opts = ["--style-glob", "**/*.rb"]
  @fail_on_error = true

  yield self if block_given?

  unless ::Rake.application.last_comment
    desc %(Check code quality metrics with Tuxedo)
  end

  task name do
    Tuxedo.output_to_console
  end
end

Instance Attribute Details

#cane_optsObject

Returns the value of attribute cane_opts.



11
12
13
# File 'lib/tuxedo/rake_task.rb', line 11

def cane_opts
  @cane_opts
end

#fail_on_errorObject

Returns the value of attribute fail_on_error.



10
11
12
# File 'lib/tuxedo/rake_task.rb', line 10

def fail_on_error
  @fail_on_error
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end