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.



51
52
53
54
55
56
57
58
59
60
# File 'lib/routes_coverage.rb', line 51

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.



46
47
48
# File 'lib/routes_coverage.rb', line 46

def exclude_namespaces
  @exclude_namespaces
end

#exclude_patternsObject (readonly)

Returns the value of attribute exclude_patterns.



46
47
48
# File 'lib/routes_coverage.rb', line 46

def exclude_patterns
  @exclude_patterns
end

#exclude_put_fallbacksObject

Returns the value of attribute exclude_put_fallbacks.



47
48
49
# File 'lib/routes_coverage.rb', line 47

def exclude_put_fallbacks
  @exclude_put_fallbacks
end

#formatObject

Returns the value of attribute format.



47
48
49
# File 'lib/routes_coverage.rb', line 47

def format
  @format
end

#groupsObject (readonly)

Returns the value of attribute groups.



46
47
48
# File 'lib/routes_coverage.rb', line 46

def groups
  @groups
end

#include_from_controller_testsObject

Returns the value of attribute include_from_controller_tests.



47
48
49
# File 'lib/routes_coverage.rb', line 47

def include_from_controller_tests
  @include_from_controller_tests
end

#minimum_coverageObject

Returns the value of attribute minimum_coverage.



47
48
49
# File 'lib/routes_coverage.rb', line 47

def minimum_coverage
  @minimum_coverage
end

#perform_reportObject

Returns the value of attribute perform_report.



47
48
49
# File 'lib/routes_coverage.rb', line 47

def perform_report
  @perform_report
end

#round_precisionObject

Returns the value of attribute round_precision.



47
48
49
# File 'lib/routes_coverage.rb', line 47

def round_precision
  @round_precision
end

Instance Method Details

#formatter_classObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/routes_coverage.rb', line 62

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