Sha256: 75eadcf157b71c0cff1ba5ef91b28dd76c0379b606303b835a122b5797b1d74b

Contents?: true

Size: 578 Bytes

Versions: 7

Compression:

Stored size: 578 Bytes

Contents

module PactBroker
  module Api
    module Decorators
      class DecoratorContext < Hash

        attr_reader :base_url, :resource_url, :resource_title, :env

        def initialize base_url, resource_url, env, options = {}
          @base_url = self[:base_url] = base_url
          @resource_url = self[:resource_url]= resource_url
          @resource_title = self[:resource_title] = options[:resource_title]
          @env = self[:env] = env
          merge!(options)
        end

        def to_s
          "DecoratorContext #{super}"
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pact_broker-2.58.0 lib/pact_broker/api/decorators/decorator_context.rb
pact_broker-2.57.0 lib/pact_broker/api/decorators/decorator_context.rb
pact_broker-2.56.1 lib/pact_broker/api/decorators/decorator_context.rb
pact_broker-2.56.0 lib/pact_broker/api/decorators/decorator_context.rb
pact_broker-2.55.0 lib/pact_broker/api/decorators/decorator_context.rb
pact_broker-2.54.0 lib/pact_broker/api/decorators/decorator_context.rb
pact_broker-2.53.0 lib/pact_broker/api/decorators/decorator_context.rb