Class: RungerActions::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/runger_actions/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:) ⇒ Result

Returns a new instance of Result.



6
7
8
9
10
# File 'lib/runger_actions/result.rb', line 6

def initialize(action:)
  @action = action
  @return_values = {}
  @failure = nil
end

Instance Attribute Details

#error_messageObject (readonly)

Returns the value of attribute error_message.



4
5
6
# File 'lib/runger_actions/result.rb', line 4

def error_message
  @error_message
end

#return_valuesObject (readonly)

Returns the value of attribute return_values.



4
5
6
# File 'lib/runger_actions/result.rb', line 4

def return_values
  @return_values
end

Instance Method Details

#lock!Object



12
13
14
# File 'lib/runger_actions/result.rb', line 12

def lock!
  @locked = true
end

#locked?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/runger_actions/result.rb', line 16

def locked?
  @locked == true
end

#success?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/runger_actions/result.rb', line 20

def success?
  @failure.nil?
end