Class: FedoraMigrate::RubydoraConnection
- Inherits:
-
Object
- Object
- FedoraMigrate::RubydoraConnection
- Defined in:
- lib/fedora_migrate/rubydora_connection.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #connect(force = false) ⇒ Object
-
#initialize(params = {}) ⇒ RubydoraConnection
constructor
A new instance of RubydoraConnection.
Constructor Details
#initialize(params = {}) ⇒ RubydoraConnection
Returns a new instance of RubydoraConnection.
5 6 7 8 9 |
# File 'lib/fedora_migrate/rubydora_connection.rb', line 5 def initialize(params = {}) params = params.dup self. = params connect end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
3 4 5 |
# File 'lib/fedora_migrate/rubydora_connection.rb', line 3 def connection @connection end |
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/fedora_migrate/rubydora_connection.rb', line 3 def @options end |
Instance Method Details
#connect(force = false) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/fedora_migrate/rubydora_connection.rb', line 11 def connect(force = false) return unless @connection.nil? || force = [:url, :user, :password, :timeout, :open_timeout, :ssl_client_cert, :ssl_client_key, :validateChecksum] = .reject { |k, _v| !.include?(k) } @connection = Rubydora.connect end |