Class: ArchivesSpace::Configuration
- Inherits:
-
Object
- Object
- ArchivesSpace::Configuration
- 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
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#password ⇒ Object
Returns the value of attribute password.
-
#throttle ⇒ Object
Returns the value of attribute throttle.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
-
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
Instance Method Summary collapse
-
#initialize(settings = {}) ⇒ Configuration
constructor
A new instance of Configuration.
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_uri ⇒ Object
Returns the value of attribute base_uri.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def base_uri @base_uri end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def debug @debug end |
#page_size ⇒ Object
Returns the value of attribute page_size.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def page_size @page_size end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def password @password end |
#throttle ⇒ Object
Returns the value of attribute throttle.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def throttle @throttle end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def username @username end |
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
5 6 7 |
# File 'lib/archivesspace/client/configuration.rb', line 5 def verify_ssl @verify_ssl end |