Class: TestLauncher::Queries::CommandFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/test_launcher/queries.rb

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ CommandFinder

Returns a new instance of CommandFinder.



4
5
6
# File 'lib/test_launcher/queries.rb', line 4

def initialize(request)
  @request = request
end

Instance Method Details

#by_pathObject



16
17
18
# File 'lib/test_launcher/queries.rb', line 16

def by_path
  commandify(PathQuery)
end

#commandify(klass) ⇒ Object



52
53
54
55
56
57
# File 'lib/test_launcher/queries.rb', line 52

def commandify(klass)
  klass.new(
    request,
    self
  ).command
end

#example_nameObject



20
21
22
# File 'lib/test_launcher/queries.rb', line 20

def example_name
  commandify(ExampleNameQuery)
end

#from_full_regexObject



28
29
30
# File 'lib/test_launcher/queries.rb', line 28

def from_full_regex
  commandify(FullRegexQuery)
end

#full_searchObject



32
33
34
# File 'lib/test_launcher/queries.rb', line 32

def full_search
  commandify(SearchQuery)
end

#generic_searchObject



36
37
38
# File 'lib/test_launcher/queries.rb', line 36

def generic_search
  commandify(GenericQuery)
end

#line_numberObject



40
41
42
# File 'lib/test_launcher/queries.rb', line 40

def line_number
  commandify(LineNumberQuery)
end

#multi_example_nameObject



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

def multi_example_name
  commandify(MultiExampleNameQuery)
end

#multi_path_queryObject



12
13
14
# File 'lib/test_launcher/queries.rb', line 12

def multi_path_query
  commandify(MultiPathQuery)
end

#requestObject



48
49
50
# File 'lib/test_launcher/queries.rb', line 48

def request
  @request
end

#rerunObject



44
45
46
# File 'lib/test_launcher/queries.rb', line 44

def rerun
  commandify(RerunQuery)
end

#specified_nameObject



8
9
10
# File 'lib/test_launcher/queries.rb', line 8

def specified_name
  commandify(SpecifiedNameQuery)
end