Sha256: d39ccc26692248a78888cb2aece4d23988b2d545aad478f452237f02aeb3c9b6

Contents?: true

Size: 578 Bytes

Versions: 7

Compression:

Stored size: 578 Bytes

Contents

module ArchivesSpace

  class Configuration

    def defaults
      {
        base_uri: "http://localhost:8089",
        base_repo: "",
        username: "admin",
        password: "admin",
        page_size: 50,
        throttle: 0,
        verify_ssl: true,
      }
    end

    def initialize(settings = {})
      settings = defaults.merge(settings)
      settings.each do |property, value|
        next unless defaults.keys.include? property
        instance_variable_set("@#{property}", value)
        self.class.send(:attr_accessor, property)
      end
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archivesspace-client-0.1.6 lib/archivesspace/client/configuration.rb
archivesspace-client-0.1.5 lib/archivesspace/client/configuration.rb
archivesspace-client-0.1.4 lib/archivesspace/client/configuration.rb
archivesspace-client-0.1.3 lib/archivesspace/client/configuration.rb
archivesspace-client-0.1.2 lib/archivesspace/client/configuration.rb
archivesspace-client-0.1.1 lib/archivesspace/client/configuration.rb
archivesspace-client-0.1.0 lib/archivesspace/client/configuration.rb