Class: Buildr::Emma::EmmaConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/buildr/java/emma.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ EmmaConfig

Returns a new instance of EmmaConfig.



74
75
76
# File 'lib/buildr/java/emma.rb', line 74

def initialize(project)
  @project = project
end

Instance Attribute Details

#coverage_fileObject



83
84
85
# File 'lib/buildr/java/emma.rb', line 83

def coverage_file
  @coverage_file ||= File.join(report_dir, 'coverage.ec')
end

#instrumented_dirObject



91
92
93
# File 'lib/buildr/java/emma.rb', line 91

def instrumented_dir
  @instrumented_dir ||= project.path_to(:target, :instrumented, :classes)
end

#metadata_fileObject



87
88
89
# File 'lib/buildr/java/emma.rb', line 87

def 
  @metadata_file ||= File.join(report_dir, 'coverage.em')
end

#report_dirObject



95
96
97
# File 'lib/buildr/java/emma.rb', line 95

def report_dir
  @report_dir ||= project.path_to(:reports, :emma)
end

Instance Method Details

#exclude(*classPatterns) ⇒ Object

:call-seq:

project.emma.exclude(*classPatterns)


118
119
120
121
# File 'lib/buildr/java/emma.rb', line 118

def exclude(*classPatterns)
  excludes.push(*classPatterns)
  self
end

#excludesObject



123
124
125
# File 'lib/buildr/java/emma.rb', line 123

def excludes
  @excludeClasses ||= []
end

#include(*classPatterns) ⇒ Object

:call-seq:

project.emma.include(*classPatterns)


106
107
108
109
# File 'lib/buildr/java/emma.rb', line 106

def include(*classPatterns)
  includes.push(*classPatterns)
  self
end

#includesObject



111
112
113
# File 'lib/buildr/java/emma.rb', line 111

def includes
  @includeClasses ||= []
end

#report_to(format) ⇒ Object



99
100
101
# File 'lib/buildr/java/emma.rb', line 99

def report_to format
  report_dir
end

#sourcesObject



127
128
129
# File 'lib/buildr/java/emma.rb', line 127

def sources
  project.compile.sources
end