Class: Dor::StaticConfig::SuriConfig
- Inherits:
-
Object
- Object
- Dor::StaticConfig::SuriConfig
- Defined in:
- lib/dor/static_config/suri_config.rb
Overview
Represents the configuration for the identifier minter service (suri)
Instance Method Summary collapse
- #configure(&block) ⇒ Object
- #id_namespace(new_value = nil) ⇒ Object
-
#initialize(hash) ⇒ SuriConfig
constructor
A new instance of SuriConfig.
- #mint_ids(new_value = nil) ⇒ Object
- #pass(new_value = nil) ⇒ Object
- #url(new_value = nil) ⇒ Object
- #user(new_value = nil) ⇒ Object
Constructor Details
#initialize(hash) ⇒ SuriConfig
Returns a new instance of SuriConfig.
7 8 9 10 11 12 13 |
# File 'lib/dor/static_config/suri_config.rb', line 7 def initialize(hash) @mint_ids = hash.fetch(:mint_ids) @pass = hash.fetch(:pass) @id_namespace = hash.fetch(:id_namespace) @url = hash.fetch(:url) @user = hash.fetch(:user) end |
Instance Method Details
#configure(&block) ⇒ Object
15 16 17 |
# File 'lib/dor/static_config/suri_config.rb', line 15 def configure(&block) instance_eval(&block) end |
#id_namespace(new_value = nil) ⇒ Object
24 25 26 27 |
# File 'lib/dor/static_config/suri_config.rb', line 24 def id_namespace(new_value = nil) @id_namespace = new_value if new_value @id_namespace end |
#mint_ids(new_value = nil) ⇒ Object
19 20 21 22 |
# File 'lib/dor/static_config/suri_config.rb', line 19 def mint_ids(new_value = nil) @mint_ids = new_value if new_value @mint_ids end |
#pass(new_value = nil) ⇒ Object
39 40 41 42 |
# File 'lib/dor/static_config/suri_config.rb', line 39 def pass(new_value = nil) @pass = new_value if new_value @pass end |
#url(new_value = nil) ⇒ Object
29 30 31 32 |
# File 'lib/dor/static_config/suri_config.rb', line 29 def url(new_value = nil) @url = new_value if new_value @url end |
#user(new_value = nil) ⇒ Object
34 35 36 37 |
# File 'lib/dor/static_config/suri_config.rb', line 34 def user(new_value = nil) @user = new_value if new_value @user end |