Module: PactBroker::Pacts::GenerateInteractionSha

Extended by:
OrderHashKeys
Included in:
Content
Defined in:
lib/pact_broker/pacts/generate_interaction_sha.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from OrderHashKeys

order_child_array, order_hash, order_hash_keys

Class Method Details

.call(interaction_hash) ⇒ Object



9
10
11
# File 'lib/pact_broker/pacts/generate_interaction_sha.rb', line 9

def self.call interaction_hash
  Digest::SHA1.hexdigest(order_hash_keys(interaction_hash).to_json)
end

Instance Method Details

#generate_interaction_sha(interaction_hash) ⇒ Object



13
14
15
# File 'lib/pact_broker/pacts/generate_interaction_sha.rb', line 13

def generate_interaction_sha(interaction_hash)
  GenerateInteractionSha.call(interaction_hash)
end