Class: Ezid::Configuration Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

EZID client configuration.

Use Ezid::Client.configure to set values.

Constant Summary collapse

HOST =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"ezid.cdlib.org"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Configuration.



48
49
50
51
52
53
# File 'lib/ezid/configuration.rb', line 48

def initialize
  @user = ENV["EZID_USER"]
  @password = ENV["EZID_PASSWORD"]
  @host = ENV["EZID_HOST"] || HOST
  @use_ssl = ENV["EZID_USE_SSL"] != false.to_s
end

Instance Attribute Details

#default_shoulderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Default shoulder for minting (scheme + NAAN + shoulder)

Examples:

“ark:/99999/fk4”




46
47
48
# File 'lib/ezid/configuration.rb', line 46

def default_shoulder
  @default_shoulder
end

#hostObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID host name

Default: "ezid.cdlib.org"


16
17
18
# File 'lib/ezid/configuration.rb', line 16

def host
  @host
end

#loggerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



55
56
57
# File 'lib/ezid/configuration.rb', line 55

def logger
  @logger ||= Logger.new(STDERR)
end

#passwordObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID password

Default: value of `EZID_PASSWORD` environment variable


28
29
30
# File 'lib/ezid/configuration.rb', line 28

def password
  @password
end

#use_sslObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Use HTTPS?

Default: `true`


20
21
22
# File 'lib/ezid/configuration.rb', line 20

def use_ssl
  @use_ssl
end

#userObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

EZID user name

Default: value of `EZID_USER` environment variable


24
25
26
# File 'lib/ezid/configuration.rb', line 24

def user
  @user
end

Instance Method Details

#identifierObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



59
60
61
# File 'lib/ezid/configuration.rb', line 59

def identifier
  Identifier
end