Class: Buildr::Cobertura::CoberturaConfig
- Defined in:
- lib/buildr/java/cobertura.rb
Overview
:nodoc:
Instance Attribute Summary collapse
Instance Method Summary collapse
- #check ⇒ Object
-
#exclude(*classPatterns) ⇒ Object
:call-seq: project.cobertura.exclude(*classPatterns).
- #excludes ⇒ Object
-
#include(*classPatterns) ⇒ Object
:call-seq: project.cobertura.include(*classPatterns).
- #includes ⇒ Object
-
#initialize(project) ⇒ CoberturaConfig
constructor
A new instance of CoberturaConfig.
- #report_to(file = nil) ⇒ Object
- #sources ⇒ Object
Constructor Details
#initialize(project) ⇒ CoberturaConfig
Returns a new instance of CoberturaConfig.
68 69 70 |
# File 'lib/buildr/java/cobertura.rb', line 68 def initialize(project) @project = project end |
Instance Attribute Details
#data_file ⇒ Object
77 78 79 |
# File 'lib/buildr/java/cobertura.rb', line 77 def data_file @data_file ||= project.path_to(:reports, 'cobertura.ser') end |
Instance Method Details
#check ⇒ Object
121 122 123 |
# File 'lib/buildr/java/cobertura.rb', line 121 def check @check ||= CoberturaCheck.new end |
#exclude(*classPatterns) ⇒ Object
:call-seq:
project.cobertura.exclude(*classPatterns)
108 109 110 111 |
# File 'lib/buildr/java/cobertura.rb', line 108 def exclude(*classPatterns) excludes.push(*classPatterns.map { |p| String === p ? Regexp.new(p) : p }) self end |
#excludes ⇒ Object
113 114 115 |
# File 'lib/buildr/java/cobertura.rb', line 113 def excludes @excludeClasses ||= [] end |
#include(*classPatterns) ⇒ Object
:call-seq:
project.cobertura.include(*classPatterns)
96 97 98 99 |
# File 'lib/buildr/java/cobertura.rb', line 96 def include(*classPatterns) includes.push(*classPatterns.map { |p| String === p ? Regexp.new(p) : p }) self end |
#includes ⇒ Object
101 102 103 |
# File 'lib/buildr/java/cobertura.rb', line 101 def includes @includeClasses ||= [] end |
#report_to(file = nil) ⇒ Object
89 90 91 |
# File 'lib/buildr/java/cobertura.rb', line 89 def report_to(file = nil) File.(File.join(*[report_dir, file.to_s].compact)) end |