Class: RoutesCoverage::Settings

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSettings

Returns a new instance of Settings.



25
26
27
28
29
30
31
32
33
34
# File 'lib/routes_coverage.rb', line 25

def initialize
  @exclude_patterns = []
  @exclude_namespaces = []
  @exclude_put_fallbacks = false
  @minimum_coverage = 1
  @round_precision = 1
  @format = :html
  @groups = {}
  @perform_report = true
end

Instance Attribute Details

#exclude_namespacesObject (readonly)

Returns the value of attribute exclude_namespaces.



22
23
24
# File 'lib/routes_coverage.rb', line 22

def exclude_namespaces
  @exclude_namespaces
end

#exclude_patternsObject (readonly)

Returns the value of attribute exclude_patterns.



22
23
24
# File 'lib/routes_coverage.rb', line 22

def exclude_patterns
  @exclude_patterns
end

#exclude_put_fallbacksObject

Returns the value of attribute exclude_put_fallbacks.



23
24
25
# File 'lib/routes_coverage.rb', line 23

def exclude_put_fallbacks
  @exclude_put_fallbacks
end

#formatObject

Returns the value of attribute format.



23
24
25
# File 'lib/routes_coverage.rb', line 23

def format
  @format
end

#groupsObject (readonly)

Returns the value of attribute groups.



22
23
24
# File 'lib/routes_coverage.rb', line 22

def groups
  @groups
end

#minimum_coverageObject

Returns the value of attribute minimum_coverage.



23
24
25
# File 'lib/routes_coverage.rb', line 23

def minimum_coverage
  @minimum_coverage
end

#perform_reportObject

Returns the value of attribute perform_report.



23
24
25
# File 'lib/routes_coverage.rb', line 23

def perform_report
  @perform_report
end

#round_precisionObject

Returns the value of attribute round_precision.



23
24
25
# File 'lib/routes_coverage.rb', line 23

def round_precision
  @round_precision
end

Instance Method Details

#formatter_classObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/routes_coverage.rb', line 36

def formatter_class
  case format
  when :full_text
    Formatters::FullText
  when :summary_text
    Formatters::SummaryText
  when :html, :simplecov_html
    Formatters::Html
  when Formatters::Base
    format
  else
    raise "Unknown formatter #{settings.format.inspect}"
  end
end