Class: Quality::Config
- Inherits:
-
Object
- Object
- Quality::Config
- Extended by:
- Forwardable
- Defined in:
- lib/quality/config.rb
Overview
Configuration for running quality tool
Instance Attribute Summary collapse
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#punchlist_regexp ⇒ Object
Returns the value of attribute punchlist_regexp.
-
#quality_name ⇒ Object
Returns the value of attribute quality_name.
-
#ratchet_name ⇒ Object
Returns the value of attribute ratchet_name.
-
#skip_tools ⇒ Object
Returns the value of attribute skip_tools.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
- #all_output_files ⇒ Object
-
#initialize(quality_name: 'quality', ratchet_name: 'ratchet', globber: raise) ⇒ Config
constructor
A new instance of Config.
- #source_file_globber ⇒ Object
Constructor Details
#initialize(quality_name: 'quality', ratchet_name: 'ratchet', globber: raise) ⇒ Config
Returns a new instance of Config.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/quality/config.rb', line 78 def initialize(quality_name: 'quality', ratchet_name: 'ratchet', globber: raise) @quality_name = quality_name @ratchet_name = ratchet_name @skip_tools = [] @output_dir = 'metrics' @verbose = false @globber = globber source_file_globber.source_files_exclude_glob = '{' + source_file_globber.source_files_exclude_glob + ',db/schema.rb' \ '}' end |
Instance Attribute Details
#output_dir ⇒ Object
Returns the value of attribute output_dir.
10 11 12 |
# File 'lib/quality/config.rb', line 10 def output_dir @output_dir end |
#punchlist_regexp ⇒ Object
Returns the value of attribute punchlist_regexp.
10 11 12 |
# File 'lib/quality/config.rb', line 10 def punchlist_regexp @punchlist_regexp end |
#quality_name ⇒ Object
Returns the value of attribute quality_name.
10 11 12 |
# File 'lib/quality/config.rb', line 10 def quality_name @quality_name end |
#ratchet_name ⇒ Object
Returns the value of attribute ratchet_name.
10 11 12 |
# File 'lib/quality/config.rb', line 10 def ratchet_name @ratchet_name end |
#skip_tools ⇒ Object
Returns the value of attribute skip_tools.
10 11 12 |
# File 'lib/quality/config.rb', line 10 def skip_tools @skip_tools end |
#verbose ⇒ Object
Returns the value of attribute verbose.
10 11 12 |
# File 'lib/quality/config.rb', line 10 def verbose @verbose end |
Instance Method Details
#all_output_files ⇒ Object
74 75 76 |
# File 'lib/quality/config.rb', line 74 def all_output_files @globber.glob("#{output_dir}/*_high_water_mark") end |
#source_file_globber ⇒ Object
69 70 71 72 |
# File 'lib/quality/config.rb', line 69 def source_file_globber @source_file_globber ||= SourceFinder::SourceFileGlobber.new(globber: @globber) end |