Sha256: ccc62898a6d52c77018351e33f82565d20d8d3812e85aa03888d009c6a1c515a

Contents?: true

Size: 736 Bytes

Versions: 142

Compression:

Stored size: 736 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
                begin
                  cnf[key] = self[key].clone
                rescue TypeError
                  cnf[key] = self[key]
                end
              end
            end
          end

        end
      end
    end
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
eco-helpers-1.5.13 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.12 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.11 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.10 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.9 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.8 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.7 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.6 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.5 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.4 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.3 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.2 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.1 lib/eco/api/session/config/base_config.rb
eco-helpers-1.5.0 lib/eco/api/session/config/base_config.rb
eco-helpers-1.4.2 lib/eco/api/session/config/base_config.rb
eco-helpers-1.3.19 lib/eco/api/session/config/base_config.rb
eco-helpers-1.4.1 lib/eco/api/session/config/base_config.rb
eco-helpers-1.4.0 lib/eco/api/session/config/base_config.rb
eco-helpers-1.3.18 lib/eco/api/session/config/base_config.rb
eco-helpers-1.3.17 lib/eco/api/session/config/base_config.rb