Class: Teaspoon::Configuration::Coverage

Inherits:
Object
  • Object
show all
Defined in:
lib/teaspoon/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Coverage

Returns a new instance of Coverage.

Yields:

  • (_self)

Yield Parameters:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/teaspoon/configuration.rb', line 118

def initialize
  @reports      = ["text-summary"]
  @output_path  = "coverage"
  @ignore       = [%r{/.rvm/gems/}, %r{/lib/ruby/gems/}, %r{/vendor/assets/}, %r{/support/}, %r{/(.+)_helper.}]

  @statements   = nil
  @functions    = nil
  @branches     = nil
  @lines        = nil

  default = Teaspoon.configuration.coverage_configs["default"]
  instance_eval(&default[:block]) if default
  yield self if block_given?
end

Instance Attribute Details

#branchesObject

Returns the value of attribute branches.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def branches
  @branches
end

#functionsObject

Returns the value of attribute functions.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def functions
  @functions
end

#ignoreObject

Returns the value of attribute ignore.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def ignore
  @ignore
end

#linesObject

Returns the value of attribute lines.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def lines
  @lines
end

#output_pathObject

Returns the value of attribute output_path.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def output_path
  @output_path
end

#reportsObject

Returns the value of attribute reports.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def reports
  @reports
end

#statementsObject

Returns the value of attribute statements.



115
116
117
# File 'lib/teaspoon/configuration.rb', line 115

def statements
  @statements
end