Class: Umarell::Arguments

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

Overview

The class responsible of parsing command line arguments

Constant Summary collapse

DEFAULT_TARGET =
'./'
MODIFIED_FILES_TARGET =
'`git ls-files -mo --exclude-standard %s`'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArguments

Returns a new instance of Arguments.



15
16
17
18
19
# File 'lib/umarell/arguments.rb', line 15

def initialize
  @autofix = false
  @modified = false
  @target = DEFAULT_TARGET
end

Instance Attribute Details

#autofixObject (readonly) Also known as: autofix?

Returns the value of attribute autofix.



8
9
10
# File 'lib/umarell/arguments.rb', line 8

def autofix
  @autofix
end

#targetObject (readonly)

Returns the value of attribute target.



8
9
10
# File 'lib/umarell/arguments.rb', line 8

def target
  @target
end

Instance Method Details

#parseObject

Parse command line arguments



22
23
24
25
# File 'lib/umarell/arguments.rb', line 22

def parse
  parse_options
  parse_target
end