Class: Cukunity::CLI::ArgumentParser

Inherits:
Object
  • Object
show all
Defined in:
lib/cukunity/cli/argument_parser.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ArgumentParser

Returns a new instance of ArgumentParser.



17
18
19
# File 'lib/cukunity/cli/argument_parser.rb', line 17

def initialize(args)
  @args = args.dup
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



6
7
8
# File 'lib/cukunity/cli/argument_parser.rb', line 6

def args
  @args
end

#commandObject (readonly)

Returns the value of attribute command.



10
11
12
# File 'lib/cukunity/cli/argument_parser.rb', line 10

def command
  @command
end

#cucumber_argsObject (readonly)

Returns the value of attribute cucumber_args.



8
9
10
# File 'lib/cukunity/cli/argument_parser.rb', line 8

def cucumber_args
  @cucumber_args
end

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/cukunity/cli/argument_parser.rb', line 9

def options
  @options
end

#remaining_argsObject (readonly)

Returns the value of attribute remaining_args.



7
8
9
# File 'lib/cukunity/cli/argument_parser.rb', line 7

def remaining_args
  @remaining_args
end

Class Method Details

.parse(args) ⇒ Object



12
13
14
15
# File 'lib/cukunity/cli/argument_parser.rb', line 12

def self.parse(args)
  parser = new(args)
  parser.parse
end

Instance Method Details

#parseObject



21
22
23
24
# File 'lib/cukunity/cli/argument_parser.rb', line 21

def parse
  parse_options
  parse_command
end