Class: EY::Serverside::Shell::CommandResult

Inherits:
Struct show all
Defined in:
lib/engineyard-serverside/shell/command_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

json_create, #to_json

Instance Attribute Details

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



4
5
6
# File 'lib/engineyard-serverside/shell/command_result.rb', line 4

def command
  @command
end

#exitstatusObject

Returns the value of attribute exitstatus

Returns:

  • (Object)

    the current value of exitstatus



4
5
6
# File 'lib/engineyard-serverside/shell/command_result.rb', line 4

def exitstatus
  @exitstatus
end

#outputObject

Returns the value of attribute output

Returns:

  • (Object)

    the current value of output



4
5
6
# File 'lib/engineyard-serverside/shell/command_result.rb', line 4

def output
  @output
end

Instance Method Details

#inspectObject



9
10
11
12
13
14
15
16
# File 'lib/engineyard-serverside/shell/command_result.rb', line 9

def inspect
  <<-EOM
$ #{command}
#{output}

($?: #{exitstatus})
  EOM
end

#success?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/engineyard-serverside/shell/command_result.rb', line 5

def success?
  exitstatus.zero?
end