Class: Fudge::FileFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/fudge/file_finder.rb

Overview

Allows building of commands which run against a set of files

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ FileFinder

Returns a new instance of FileFinder.



6
7
8
# File 'lib/fudge/file_finder.rb', line 6

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/fudge/file_finder.rb', line 4

def options
  @options
end

Instance Method Details

#generate_command(name, tty_options) ⇒ Object

Generates a command line with command and any tty_option



11
12
13
14
15
16
17
# File 'lib/fudge/file_finder.rb', line 11

def generate_command(name, tty_options)
  cmd = []
  cmd << name
  cmd += tty_options
  cmd << "`#{find_filters.join(' | ')}`"
  cmd.join(' ')
end