Class: Inch::CLI::Arguments
- Inherits:
-
Object
- Object
- Inch::CLI::Arguments
- Defined in:
- lib/inch/cli/arguments.rb
Overview
Arguments parses given command-line arguments into the categories files
, object_names
, and switches
.
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#object_names ⇒ Object
readonly
Returns the value of attribute object_names.
-
#switches ⇒ Object
readonly
Returns the value of attribute switches.
Instance Method Summary collapse
-
#initialize(args) ⇒ Arguments
constructor
A new instance of Arguments.
Constructor Details
#initialize(args) ⇒ Arguments
Returns a new instance of Arguments.
19 20 21 22 23 24 |
# File 'lib/inch/cli/arguments.rb', line 19 def initialize(args) @files = [] @object_names = [] @switches = [] parse(args) end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
16 17 18 |
# File 'lib/inch/cli/arguments.rb', line 16 def files @files end |
#object_names ⇒ Object (readonly)
Returns the value of attribute object_names.
16 17 18 |
# File 'lib/inch/cli/arguments.rb', line 16 def object_names @object_names end |
#switches ⇒ Object (readonly)
Returns the value of attribute switches.
16 17 18 |
# File 'lib/inch/cli/arguments.rb', line 16 def switches @switches end |