Method: Contracts::Formatters::Expected#hash_contract

Defined in:
lib/contracts/formatters.rb

#hash_contract(hash) ⇒ Object

Formats Hash contracts.



24
25
26
27
28
29
# File 'lib/contracts/formatters.rb', line 24

def hash_contract(hash)
  @full = true # Complex values output completely, overriding @full
  hash.inject({}) do |repr, (k, v)|
    repr.merge(k => InspectWrapper.create(contract(v), @full))
  end.inspect
end