Class Consular::CLI
In: lib/consular/cli.rb
Parent: Thor

The CLI provides the command line interface for Consular. These are interfaced via the consular bin file.

Methods

Included Modules

Thor::Actions

Public Class methods

Source root for Thor to find templates

Public Instance methods

Returns a dialoag to select the desired core.

@param [Array<Core>] Array of cores

@return [Core] core from selection

@api private

Returns the first comment in file. This is used as the title when listing out the scripts.

@param [String] file

  path to file

@api private

Returns an error message unless the file exists. If it does execute the block

@param [String] file

  Path of file

@param [Proc] blk

  Proc to execute if file exists.

@api private

Opens Termfile in specified editor.

@param [String] path

  Path to Termfile

@param [String] editor

  Editor to open Termfile with.

@example

  open_in_editor '/path/to/Termfile', 'vim'

@api private

Returns the full pathname of the Termfile

@param [String] project

  designated file/project name

@return [String] full path name for Termfile.

@example

  termfile_path           #=> ROOT/Termfile
  termfile_path 'foo'     #=> GLOBAL_PATH/foo.term
  termfile_path 'bar.yml' #=> GLOBAL_PATH/bar.yml

@api private

Returns the first core that matchees the currrent system.

@return [Core] Core that matches the system.

@api private

[Validate]