Class: OpsWalrus::Invocation::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/opswalrus/ops_file_script_dsl.rb

Direct Known Subclasses

Error, Success

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, exit_status = 0) ⇒ Result

Returns a new instance of Result.



20
21
22
23
# File 'lib/opswalrus/ops_file_script_dsl.rb', line 20

def initialize(value, exit_status = 0)
  @value = value
  @exit_status = exit_status
end

Instance Attribute Details

#exit_statusObject

Returns the value of attribute exit_status.



19
20
21
# File 'lib/opswalrus/ops_file_script_dsl.rb', line 19

def exit_status
  @exit_status
end

#valueObject

Returns the value of attribute value.



18
19
20
# File 'lib/opswalrus/ops_file_script_dsl.rb', line 18

def value
  @value
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/opswalrus/ops_file_script_dsl.rb', line 27

def failure?
  !success?
end

#success?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/opswalrus/ops_file_script_dsl.rb', line 24

def success?
  !failure?
end