Class: Umarell::Arguments
- Inherits:
-
Object
- Object
- Umarell::Arguments
- 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
-
#autofix ⇒ Object
(also: #autofix?)
readonly
Returns the value of attribute autofix.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize ⇒ Arguments
constructor
A new instance of Arguments.
-
#parse ⇒ Object
Parse command line arguments.
Constructor Details
#initialize ⇒ Arguments
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
#autofix ⇒ Object (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 |
#target ⇒ Object (readonly)
Returns the value of attribute target.
8 9 10 |
# File 'lib/umarell/arguments.rb', line 8 def target @target end |
Instance Method Details
#parse ⇒ Object
Parse command line arguments
22 23 24 25 |
# File 'lib/umarell/arguments.rb', line 22 def parse parse_target end |