Sha256: cd175163f6a3753a18a5e3cae0e3e3fb7481b514a0f7eb409e1a19bb661ac3a5

Contents?: true

Size: 641 Bytes

Versions: 1

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: true

module ArchivesSpace
  class Configuration
    def defaults
      {
        base_uri: "http://localhost:8089",
        base_repo: "",
        debug: false,
        username: "admin",
        password: "admin",
        page_size: 50,
        throttle: 0,
        verify_ssl: true,
        timeout: 60
      }
    end

    def initialize(settings = {})
      settings = defaults.merge(settings)
      settings.each do |property, value|
        next unless defaults.key?(property)

        instance_variable_set("@#{property}", value)
        self.class.send(:attr_accessor, property)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archivesspace-client-0.2.0 lib/archivesspace/client/configuration.rb