Class: Omnibar::Github
Instance Attribute Summary
Attributes inherited from Query
#input
Instance Method Summary
collapse
Methods inherited from Query
#copy_to_clipboard, inherited, #initialize, #open_in_browser, #preview_text
Constructor Details
This class inherits a constructor from Omnibar::Query
Instance Method Details
13
14
15
16
|
# File 'lib/omnibar/github.rb', line 13
def perform!
param = result.downcase.gsub(/\s/, '-')
open_in_browser "https://github.com/#{param}"
end
|
#result ⇒ Object
3
4
5
6
7
|
# File 'lib/omnibar/github.rb', line 3
def result
repo = search.find(input)
return repo if repo
return input if input.match?(/^[\w-]+\/[\w-]+$/)
end
|
#search ⇒ Object
9
10
11
|
# File 'lib/omnibar/github.rb', line 9
def search
@fm = FuzzyMatch.new(Omnibar.config.github.repos)
end
|