Class: AWS::Flow::DecisionID

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/decider/async_decider.rb

Overview

Represents a decision ID.

Instance Method Summary collapse

Constructor Details

#initialize(decision_target, string_id) ⇒ DecisionID

Creates a new decision ID.

Parameters:

  • decision_target

    The decision target.

  • string_id

    The string that identifies this decision.



30
31
32
33
# File 'lib/aws/decider/async_decider.rb', line 30

def initialize(decision_target, string_id)
  @decision_target = decision_target
  @string_id = string_id
end

Instance Method Details

#eql?(other) ⇒ true, false

Is this decision ID the same as another?

Parameters:

  • other (Object)

    The object to compare with.

Returns:

  • (true, false)

    Returns ‘true` if the object is the same as this decision ID; `false` otherwise.



56
57
58
# File 'lib/aws/decider/async_decider.rb', line 56

def eql?(other)

end

#hashObject

Hash function to return an unique value for the decision ID.

Returns:

  • The calculated hash value for the decision ID.



40
41
42
43
44
45
46
# File 'lib/aws/decider/async_decider.rb', line 40

def hash
  prime = 31
  result = 1
  result = result * prime + (@decision_target == nil ? 0 : @decision_target.hash)
  result = prime * result + (@string_id == nil ? 0 : @string_id.hash)
  result
end