Class: TestLauncher::Queries::SearchQuery

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

Instance Attribute Summary

Attributes inherited from BaseQuery

#request

Instance Method Summary collapse

Methods inherited from BaseQuery

#initialize

Constructor Details

This class inherits a constructor from TestLauncher::Queries::BaseQuery

Instance Method Details

#commandObject



398
399
400
401
402
403
404
405
406
407
408
409
410
# File 'lib/test_launcher/queries.rb', line 398

def command
  {
    multi_path_query: request.search_string.include?(" "),
    line_number: request.search_string.include?(":"),
    single_search_term: true
  }.each {|command_type, valid|
    next unless valid

    command = command_finder.public_send(command_type)
    return command if command
  }
  nil
end