Sha256: 58eee50e61528259de8d4e7c01f52f27682eeabe42c2306a82edf51c2c14ba6e

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

class String
  def &(other)
    self == other[0...length]
  end
end

module Omnibar
  class Github < Query
    def repos
      %w(
      wellopp/dashboard
      wellopp/dispatch
      wellopp/magic-docs
    )
    end

    def result
      repos.each do |repo|
        user, name = repo.split('/')
        return repo if (input & repo or input & user or input & name)
      end
      nil
    end

    def perform!
      param = result.downcase.gsub(/\s/, '-')
      open_in_browser "https://github.com/#{param}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omnibar-0.0.1 lib/omnibar/github.rb