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.



31
32
33
34
35
36
37
38
# File 'lib/routes_coverage.rb', line 31

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

Instance Attribute Details

#exclude_namespacesObject (readonly)

Returns the value of attribute exclude_namespaces.



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

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

#formatObject

Returns the value of attribute format.



27
28
29
# File 'lib/routes_coverage.rb', line 27

def format
  @format
end

#groupsObject (readonly)

Returns the value of attribute groups.



29
30
31
# File 'lib/routes_coverage.rb', line 29

def groups
  @groups
end

#minimum_coverageObject

Returns the value of attribute minimum_coverage.



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

def minimum_coverage
  @minimum_coverage
end

#round_precisionObject

Returns the value of attribute round_precision.



25
26
27
# File 'lib/routes_coverage.rb', line 25

def round_precision
  @round_precision
end

Instance Method Details

#formatter_classObject



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/routes_coverage.rb', line 40

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