class Vagrant::MachineState

This represents the state of a given machine. This is a very basic class that simply stores a short and long description of the state of a machine.

The state also stores a state “id” which can be used as a unique identifier for a state. This should be a symbol. This allows internal code to compare state such as “:not_created” instead of using string comparison.

The short description should be a single word description of the state of the machine such as “running” or “not created”.

The long description can span multiple lines describing what the state actually means.

Attributes

id[R]

Unique ID for this state.

@return [Symbol]

long_description[R]

Long description for this state.

@return [String]

short_description[R]

Short description for this state.

@return [String]

Public Class Methods

new(id, short, long) click to toggle source

Creates a new instance to represent the state of a machine.

@param [Symbol] id Unique identifier for this state. @param [String] short Short (preferably one-word) description of

the state.

@param [String] long Long description (can span multiple lines)

of the state.
# File lib/vagrant/machine_state.rb, line 39
def initialize(id, short, long)
  @id                = id
  @short_description = short
  @long_description  = long
end