Class: Jscov::Configuration

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
# File 'lib/jscov/configuration.rb', line 5

def initialize
  reset!
end

Instance Attribute Details

#coverage_report_dir_pathObject

Returns the value of attribute coverage_report_dir_path.



3
4
5
# File 'lib/jscov/configuration.rb', line 3

def coverage_report_dir_path
  @coverage_report_dir_path
end

Class Method Details

.default_coverage_report_dir_pathObject



14
15
16
17
18
19
20
# File 'lib/jscov/configuration.rb', line 14

def default_coverage_report_dir_path
  if defined?(Rails)
    Rails.root.join("tmp/jscov")
  else
    "tmp/jscov"
  end
end

Instance Method Details

#reset!Object



9
10
11
# File 'lib/jscov/configuration.rb', line 9

def reset!
  self.coverage_report_dir_path = self.class.default_coverage_report_dir_path
end