def state
      running_response = running?
      return running_response unless running_response.successful?

      response = Response.new :code => 0, :data => 'not running'

      if running_response.data
        response.data = 'running'
      else
        suspended_response = suspended?
        return suspended_response unless suspended_response.successful?

        response.data = 'suspended' if suspended_response.data
      end

      response
    end
def state
      running_response = running?
      return running_response unless running_response.successful?

      response = Response.new :code => 0, :data => 'not running'

      if running_response.data
        response.data = 'running'
      else
        suspended_response = suspended?
        return suspended_response unless suspended_response.successful?

        response.data = 'suspended' if suspended_response.data
      end

      response
    end
Public: Provides the state of the VM.

 Examples

   @vm.state.data
   # => 'running'

   @vm.state.data
   # => 'not running'

   @vm.state.data
   # => 'suspended'

 Returns a Response with the result.
 If the Response is successful, the Response's data attribute will
 be a String of the state.  If the VM is currently powered on, the state
 will be 'running'.  If the VM is deemed to be suspended, the state will be
 'suspended'.  If the VM is not running and not deemed to be suspended, the
 state will be 'not running'.
 If there is an error, an unsuccessful Response will be returned.