Class: DeepCover::Config
- Inherits:
-
Object
- Object
- DeepCover::Config
- Defined in:
- lib/deep_cover/config.rb
Defined Under Namespace
Modules: Setter
Constant Summary collapse
- DEFAULTS =
{ ignore_uncovered: [], paths: %w[./app ./lib], allow_partial: false, }.freeze
Instance Method Summary collapse
- #detect_uncovered(*keywords) ⇒ Object
- #ignore_uncovered(*keywords) ⇒ Object
-
#initialize(notify = nil, **options) ⇒ Config
constructor
A new instance of Config.
- #paths(paths = nil) ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
Instance Method Details
#detect_uncovered(*keywords) ⇒ Object
26 27 28 29 |
# File 'lib/deep_cover/config.rb', line 26 def detect_uncovered(*keywords) check_uncovered(keywords) change(:ignore_uncovered, @options[:ignore_uncovered] - keywords) end |
#ignore_uncovered(*keywords) ⇒ Object
21 22 23 24 |
# File 'lib/deep_cover/config.rb', line 21 def ignore_uncovered(*keywords) check_uncovered(keywords) change(:ignore_uncovered, @options[:ignore_uncovered] | keywords) end |
#paths(paths = nil) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/deep_cover/config.rb', line 31 def paths(paths = nil) if paths change(:paths, Array(paths).dup.freeze) else @options[:paths] end end |
#to_hash ⇒ Object Also known as: to_h
16 17 18 |
# File 'lib/deep_cover/config.rb', line 16 def to_hash copy(@options) end |