Class: Monoz::Responses::RunServiceResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/monoz/services/run_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output, exit_code) ⇒ RunServiceResponse

Returns a new instance of RunServiceResponse.



13
14
15
16
# File 'lib/monoz/services/run_service.rb', line 13

def initialize(output, exit_code)
  @output = output
  @exit_code = exit_code
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



11
12
13
# File 'lib/monoz/services/run_service.rb', line 11

def exit_code
  @exit_code
end

#outputObject (readonly)

Returns the value of attribute output.



11
12
13
# File 'lib/monoz/services/run_service.rb', line 11

def output
  @output
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/monoz/services/run_service.rb', line 22

def failed?
  !!success?
end

#success?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/monoz/services/run_service.rb', line 18

def success?
  exit_code == 0
end