Class: Memo::Cli::Command::Fuzzy

Inherits:
Object
  • Object
show all
Defined in:
lib/memo/cli/command/fuzzy.rb

Instance Method Summary collapse

Constructor Details

#initialize(options, os: Memo::OS.new) ⇒ Fuzzy

Returns a new instance of Fuzzy.



5
6
7
8
9
10
11
12
# File 'lib/memo/cli/command/fuzzy.rb', line 5

def initialize(
  options,
  os: Memo::OS.new
)
  @options = options
  @os = os
  @config = Memo::Config.new
end

Instance Method Details

#callObject



14
15
16
17
18
# File 'lib/memo/cli/command/fuzzy.rb', line 14

def call
  @os.exec "#{@config.editor} "\
    "$(find #{@config.root} -type f | "\
    "#{@config.fuzzy_finder})"
end