module Noty::Services
Public Instance Methods
search(keyword)
click to toggle source
# File lib/noty/services/search.rb, line 5 def search(keyword) files = `ag -l "#{keyword}" #{STORAGE_PATH}`.lines top_matches = files[0...9].map(&:chomp) top_matches.map do |file| case File.extname(file) when '.bookmark' Bookmark.new(file) when '.snippet' Snippet.new(file) end end end