Class: Renamer::CommandLine

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

Overview

Process command-line arguments

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommandLine

Returns a new instance of CommandLine.



6
7
8
9
10
11
12
13
# File 'lib/command_line.rb', line 6

def initialize
  $VERBOSE, self.recursive, self.overwrite = false
  self.action, self.arg = nil
  
  feed
  parse
  process
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



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

def action
  @action
end

#argObject

Returns the value of attribute arg.



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

def arg
  @arg
end

#filenamesObject

Returns the value of attribute filenames.



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

def filenames
  @filenames
end

#optsObject

Returns the value of attribute opts.



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

def opts
  @opts
end

#overwriteObject

Returns the value of attribute overwrite.



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

def overwrite
  @overwrite
end

#recursiveObject

Returns the value of attribute recursive.



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

def recursive
  @recursive
end