Class: ArchivesSpace::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/archivesspace/client/configuration.rb

Constant Summary collapse

DEFAULTS =
{
  base_uri: "http://localhost:8089",
  debug: false,
  username: "admin",
  password: "admin",
  page_size: 50,
  throttle: 0,
  timeout: 60,
  verify_ssl: true
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings = {}) ⇒ Configuration

Returns a new instance of Configuration.



19
20
21
22
23
24
25
# File 'lib/archivesspace/client/configuration.rb', line 19

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

    send(:"#{property}=", value)
  end
end

Instance Attribute Details

#base_uriObject

Returns the value of attribute base_uri.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def base_uri
  @base_uri
end

#debugObject

Returns the value of attribute debug.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def debug
  @debug
end

#page_sizeObject

Returns the value of attribute page_size.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def page_size
  @page_size
end

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def password
  @password
end

#throttleObject

Returns the value of attribute throttle.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def throttle
  @throttle
end

#timeoutObject

Returns the value of attribute timeout.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def timeout
  @timeout
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def username
  @username
end

#verify_sslObject

Returns the value of attribute verify_ssl.



5
6
7
# File 'lib/archivesspace/client/configuration.rb', line 5

def verify_ssl
  @verify_ssl
end