lib/archivesspace/client/configuration.rb in archivesspace-client-0.1.6 vs lib/archivesspace/client/configuration.rb in archivesspace-client-0.1.7
- old
+ new
@@ -1,28 +1,27 @@
-module ArchivesSpace
+# frozen_string_literal: true
+module ArchivesSpace
class Configuration
-
def defaults
{
- base_uri: "http://localhost:8089",
- base_repo: "",
- username: "admin",
- password: "admin",
+ base_uri: 'http://localhost:8089',
+ base_repo: '',
+ username: 'admin',
+ password: 'admin',
page_size: 50,
throttle: 0,
- verify_ssl: true,
+ 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
\ No newline at end of file
+end