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, logs_blobstore_id) ⇒ ErrandResult

Returns a new instance of ErrandResult.



8
9
10
11
12
13
# File 'lib/cli/client/errands_client.rb', line 8

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

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



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

def exit_code
  @exit_code
end

#logs_blobstore_idObject (readonly)

Returns the value of attribute logs_blobstore_id.



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

def logs_blobstore_id
  @logs_blobstore_id
end

#stderrObject (readonly)

Returns the value of attribute stderr.



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

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



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

def stdout
  @stdout
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/cli/client/errands_client.rb', line 15

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

  local = [exit_code, stdout, stderr, logs_blobstore_id]
  other = [other.exit_code, other.stdout, other.stderr, other.logs_blobstore_id]
  local == other
end