Class Fission::Command
In: lib/fission/command/snapshot_revert.rb
lib/fission/command/snapshot_delete.rb
lib/fission/command/status.rb
lib/fission/command/start.rb
lib/fission/command/stop.rb
lib/fission/command/clone.rb
lib/fission/command/delete.rb
lib/fission/command/info.rb
lib/fission/command/suspend.rb
lib/fission/command/snapshot_create.rb
lib/fission/command/snapshot_list.rb
lib/fission/command.rb
Parent: Object

Methods

command_name   execute   help   new   summary   ui  

Included Modules

Fission::CommandHelpers

Classes and Modules

Class Fission::Command::Clone
Class Fission::Command::Delete
Class Fission::Command::Info
Class Fission::Command::SnapshotCreate
Class Fission::Command::SnapshotDelete
Class Fission::Command::SnapshotList
Class Fission::Command::SnapshotRevert
Class Fission::Command::Start
Class Fission::Command::Status
Class Fission::Command::Stop
Class Fission::Command::Suspend

Attributes

args  [R]  Internal: Returns the Array arguments of the command.
options  [R]  Internal: Returns the OpenStruct options of the command.

Public Class methods

Internal: Helper method to return the help text of a command. This is intended to be used by a command class which inherits from this class. This method will call the ‘option_parser’ method which must be defined in any class which inherits from this class.

Examples

  Fission::Command::Suspend.help

Returns a String of the output parser text.

Internal: Initializes a new Command with some basic setup. This is intended to be used as a base class for other command classes to inherit from.

args - Array of arguments which will be assigned to the args instance

       variable.

Examples

  Fission::Command.new ['foo', 'bar']

Public Instance methods

Internal: Helper method to determine the command name of command class. This should only be called against descendants of this class.

xamples:

  Fission::Command::SnapshotList.new.command_name
  # => 'snapshot list'

Returns the command name as a String.

Internal: Primary method for performing an action within a command.

Examples

  command.execute

Returns nothing

Internal: Summmary of the command. This is to be implemented by any class which inherits from this class.

Examples

  command.summary
  # => 'This command does x and y'

Returns a String summary of the command.

Internal: Helper method used to delegate UI related methods through.

Examples

  command.ui.output 'foo'

Returns a UI instance.

[Validate]