Class: Guard::Reek::Runner::Paths
- Inherits:
-
Object
- Object
- Guard::Reek::Runner::Paths
- Defined in:
- lib/guard/reek/runner.rb
Overview
this class decides which files are run against reek
Instance Method Summary collapse
-
#initialize(paths, all) ⇒ Paths
constructor
A new instance of Paths.
- #to_ary ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(paths, all) ⇒ Paths
Returns a new instance of Paths.
19 20 21 22 23 |
# File 'lib/guard/reek/runner.rb', line 19 def initialize(paths, all) @all = all @paths = paths @paths = [] if @paths.include?('.reek') end |
Instance Method Details
#to_ary ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/guard/reek/runner.rb', line 29 def to_ary if @paths.empty? Array(@all) else @paths end end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/guard/reek/runner.rb', line 25 def to_s @paths.empty? ? 'all' : @paths.to_s end |