Class: Gnomika::ArgParser

Inherits:
Object
  • Object
show all
Defined in:
lib/gnomikologikon/arg_parser.rb

Overview

Class used to parse command line arguments

Defined Under Namespace

Classes: GnomikaOptions

Class Method Summary collapse

Class Method Details

.parse(arguments) ⇒ Object

Parses the given option into a struct

Parameters:

  • arguments

    Array of parameters given to the program

Returns:

  • A GnomikaOptions object



27
28
29
30
31
32
# File 'lib/gnomikologikon/arg_parser.rb', line 27

def self.parse(arguments)
  options = GnomikaOptions.new
  parser = create_parser(options)
  parser.parse(arguments)
  options
end