Class: Ali::Arguments
- Inherits:
-
Object
- Object
- Ali::Arguments
- Defined in:
- lib/ali/arguments.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
-
#task_moniker ⇒ Object
readonly
Returns the value of attribute task_moniker.
-
#task_name ⇒ Object
readonly
Returns the value of attribute task_name.
-
#unparsed ⇒ Object
readonly
Returns the value of attribute unparsed.
Instance Method Summary collapse
-
#initialize ⇒ Arguments
constructor
A new instance of Arguments.
Constructor Details
#initialize ⇒ Arguments
Returns a new instance of Arguments.
8 9 10 11 12 13 14 15 16 |
# File 'lib/ali/arguments.rb', line 8 def initialize @unparsed = ARGV.dup @options = [] unparsed.dup.tap do |args| parse_task args args if task end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/ali/arguments.rb', line 6 def @options end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
6 7 8 |
# File 'lib/ali/arguments.rb', line 6 def task @task end |
#task_moniker ⇒ Object (readonly)
Returns the value of attribute task_moniker.
6 7 8 |
# File 'lib/ali/arguments.rb', line 6 def task_moniker @task_moniker end |
#task_name ⇒ Object (readonly)
Returns the value of attribute task_name.
6 7 8 |
# File 'lib/ali/arguments.rb', line 6 def task_name @task_name end |
#unparsed ⇒ Object (readonly)
Returns the value of attribute unparsed.
6 7 8 |
# File 'lib/ali/arguments.rb', line 6 def unparsed @unparsed end |