Sha256: a4be45a8e24f6d0e2a03507e7fa40d3b01eb52751ef481be11ab0d432484fa6e

Contents?: true

Size: 602 Bytes

Versions: 5

Compression:

Stored size: 602 Bytes

Contents

module Eco
  module API
    class Session
      class Config
        class BaseConfig < Hash
          attr_reader :config
          def initialize(config:)
            super(nil)
            @config = config
          end

          def clone(config:)
            keys.each_with_object(self.class.new(config: config)) do |key, cnf|
              begin
                cnf[key] = self[key].clone(config: cnf)
              rescue ArgumentError
                cnf[key] = self[key].clone
              end
            end
          end

        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
eco-helpers-0.9.1 lib/eco/api/session/config/base_config.rb
eco-helpers-0.8.4 lib/eco/api/session/config/base_config.rb
eco-helpers-0.8.3 lib/eco/api/session/config/base_config.rb
eco-helpers-0.8.2 lib/eco/api/session/config/base_config.rb
eco-helpers-0.8.1 lib/eco/api/session/config/base_config.rb