Class: Ali::Arguments

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeArguments

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
    parse_options args if task
  end
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/ali/arguments.rb', line 6

def options
  @options
end

#taskObject (readonly)

Returns the value of attribute task.



6
7
8
# File 'lib/ali/arguments.rb', line 6

def task
  @task
end

#task_monikerObject (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_nameObject (readonly)

Returns the value of attribute task_name.



6
7
8
# File 'lib/ali/arguments.rb', line 6

def task_name
  @task_name
end

#unparsedObject (readonly)

Returns the value of attribute unparsed.



6
7
8
# File 'lib/ali/arguments.rb', line 6

def unparsed
  @unparsed
end