Class: Bosh::Cli::Client::ErrandsClient::ErrandResult

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/client/errands_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exit_code, stdout, stderr) ⇒ ErrandResult

Returns a new instance of ErrandResult.



6
7
8
9
10
# File 'lib/cli/client/errands_client.rb', line 6

def initialize(exit_code, stdout, stderr)
  @exit_code = exit_code
  @stdout = stdout
  @stderr = stderr
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



4
5
6
# File 'lib/cli/client/errands_client.rb', line 4

def exit_code
  @exit_code
end

#stderrObject (readonly)

Returns the value of attribute stderr.



4
5
6
# File 'lib/cli/client/errands_client.rb', line 4

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



4
5
6
# File 'lib/cli/client/errands_client.rb', line 4

def stdout
  @stdout
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
17
# File 'lib/cli/client/errands_client.rb', line 12

def ==(other)
  unless other.is_a?(self.class)
    raise ArgumentError, "Must be #{self.class} to compare"
  end
  [exit_code, stdout, stderr] == [other.exit_code, other.stdout, other.stderr]
end