Class: Loops::CLI

Inherits:
Object
  • Object
show all
Includes:
Commands, Options
Defined in:
lib/loops/cli.rb,
lib/loops/cli/options.rb,
lib/loops/cli/commands.rb

Overview

Command line interface for the Loops system.

Used to parse command line options, initialize engine, and execute command requested.

Examples:

Loops::CLI.execute

Defined Under Namespace

Modules: Commands, Options

Constant Summary

Constants included from Options

Options::COMMANDS_HELP, Options::SPLIT_HELP_LINE

Instance Attribute Summary collapse

Attributes included from Options

#engine, #options

Instance Method Summary collapse

Methods included from Commands

#find_command, #find_command_possibilities, included, #run!

Methods included from Options

#bootstrap!, #extract_command!, #guess_root_dir, included, #option_parser, #parse_options!, #start_engine!

Constructor Details

#initialize(args) ⇒ CLI

Initializes a new instance of the Loops::CLI class.

Parameters:

  • args (Array<String>)

    an Array of command line arguments.



31
32
33
# File 'lib/loops/cli.rb', line 31

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

Instance Attribute Details

#argsArray<String> (readonly)

Returns The Array of (unparsed) command-line options.

Returns:

  • (Array<String>)

    The Array of (unparsed) command-line options.



24
25
26
# File 'lib/loops/cli.rb', line 24

def args
  @args
end