Class: Guard::Teabag::Resolver
- Inherits:
-
Object
- Object
- Guard::Teabag::Resolver
- Defined in:
- lib/guard/teabag/resolver.rb
Instance Attribute Summary collapse
-
#suites ⇒ Object
Returns the value of attribute suites.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Resolver
constructor
A new instance of Resolver.
- #resolve(original_paths) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Resolver
Returns a new instance of Resolver.
7 8 9 10 |
# File 'lib/guard/teabag/resolver.rb', line 7 def initialize( = {}) @options = #@excluded = Dir[@options[:exclude].to_s] end |
Instance Attribute Details
#suites ⇒ Object
Returns the value of attribute suites.
5 6 7 |
# File 'lib/guard/teabag/resolver.rb', line 5 def suites @suites end |
Instance Method Details
#resolve(original_paths) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/guard/teabag/resolver.rb', line 12 def resolve(original_paths) @suites = {} original_paths.uniq.each do |path| if result = ::Teabag::Suite.resolve_spec_for(path) suite = @suites[result[:suite]] ||= [] suite << result[:path] end end end |