class PactBroker::Api::Decorators::ExtendedPactDecorator
Make a different content type for adding extra information for the UI
, as some pact parsing tools blow up when there are unexpected keys :|
Public Instance Methods
to_hash(options = {})
click to toggle source
TODO rather than remove the contract keys that we added in the super class, it would be better to inherit from a shared super class
Calls superclass method
# File lib/pact_broker/api/decorators/extended_pact_decorator.rb, line 35 def to_hash(options = {}) keys_to_remove = represented.content_hash.keys super.each_with_object({}) do | (key, value), new_hash | new_hash[key] = value unless keys_to_remove.include?(key) end end