Class: ActiveFedora::RubydoraConnection
- Inherits:
-
Object
- Object
- ActiveFedora::RubydoraConnection
- Defined in:
- lib/active_fedora/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.
8 9 10 11 12 |
# File 'lib/active_fedora/rubydora_connection.rb', line 8 def initialize(params={}) params = params.dup self. = params connect end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
6 7 8 |
# File 'lib/active_fedora/rubydora_connection.rb', line 6 def connection @connection end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/active_fedora/rubydora_connection.rb', line 6 def @options end |
Instance Method Details
#connect(force = false) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/active_fedora/rubydora_connection.rb', line 14 def connect(force=false) return unless @connection.nil? or force = [:url, :user, :password, :timeout, :open_timeout, :ssl_client_cert, :ssl_client_key, :validateChecksum] = .reject { |k,v| not .include?(k) } #puts "CLIENT OPTS #{client_options.inspect}" @connection = Rubydora.connect end |