Class: Rubygrep::RubyGrepOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygrep/ruby_grep_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ RubyGrepOptions

Returns a new instance of RubyGrepOptions.



6
7
8
9
# File 'lib/rubygrep/ruby_grep_options.rb', line 6

def initialize(args)
  @file_reader_options, @matcher_options, @outputter_options = {}, {}, {}
  parse_options(args)
end

Instance Attribute Details

#expressionObject

Returns the value of attribute expression.



3
4
5
# File 'lib/rubygrep/ruby_grep_options.rb', line 3

def expression
  @expression
end

#file_namesObject

Returns the value of attribute file_names.



3
4
5
# File 'lib/rubygrep/ruby_grep_options.rb', line 3

def file_names
  @file_names
end

#file_reader_optionsObject

Returns the value of attribute file_reader_options.



3
4
5
# File 'lib/rubygrep/ruby_grep_options.rb', line 3

def file_reader_options
  @file_reader_options
end

#general_output_optionsObject

Returns the value of attribute general_output_options.



3
4
5
# File 'lib/rubygrep/ruby_grep_options.rb', line 3

def general_output_options
  @general_output_options
end

#matcher_optionsObject

Returns the value of attribute matcher_options.



3
4
5
# File 'lib/rubygrep/ruby_grep_options.rb', line 3

def matcher_options
  @matcher_options
end

#outputter_optionsObject

Returns the value of attribute outputter_options.



3
4
5
# File 'lib/rubygrep/ruby_grep_options.rb', line 3

def outputter_options
  @outputter_options
end

Instance Method Details

#set_multi_file_modeObject



11
12
13
# File 'lib/rubygrep/ruby_grep_options.rb', line 11

def set_multi_file_mode
  outputter_options[:with_filename] = true
end