Sha256: 2c9c973e5631f36f8e86afa20d8a8ba268302d938699f7454e3e54a73233d5ac
Contents?: true
Size: 727 Bytes
Versions: 28
Compression:
Stored size: 727 Bytes
Contents
require "pact_broker/string_refinements" module PactBroker module Api module Contracts class Configuration using PactBroker::StringRefinements def initialize(overrides = {}) @overrides = overrides end def class_for(name) if overrides[name].is_a?(String) Object.const_get(overrides[name]) elsif overrides[name].is_a?(Class) overrides[name] else Object.const_get("PactBroker::Api::Contracts::#{name.to_s.camelcase(true)}") end end def self.default_configuration Configuration.new end private attr_reader :overrides end end end end
Version data entries
28 entries across 28 versions & 1 rubygems