Class: Moab::Configuration
- Inherits:
-
Object
- Object
- Moab::Configuration
- Defined in:
- lib/moab/config.rb
Overview
A place to store configuration for the gem
Instance Method Summary collapse
- #checksum_algos(new_value = nil) ⇒ Object
- #configure(&block) ⇒ Object
- #deposit_trunk(new_value = nil) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #path_method(new_value = nil) ⇒ Object
- #storage_roots(new_value = nil) ⇒ Object
- #storage_trunk(new_value = nil) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 |
# File 'lib/moab/config.rb', line 6 def initialize @path_method = :druid_tree @checksum_algos = [:md5, :sha1, :sha256] end |
Instance Method Details
#checksum_algos(new_value = nil) ⇒ Object
35 36 37 38 |
# File 'lib/moab/config.rb', line 35 def checksum_algos(new_value = nil) @checksum_algos = new_value if new_value @checksum_algos end |
#configure(&block) ⇒ Object
11 12 13 |
# File 'lib/moab/config.rb', line 11 def configure(&block) instance_eval(&block) end |
#deposit_trunk(new_value = nil) ⇒ Object
25 26 27 28 |
# File 'lib/moab/config.rb', line 25 def deposit_trunk(new_value = nil) @deposit_trunk = new_value if new_value @deposit_trunk end |
#path_method(new_value = nil) ⇒ Object
30 31 32 33 |
# File 'lib/moab/config.rb', line 30 def path_method(new_value = nil) @path_method = new_value if new_value @path_method end |
#storage_roots(new_value = nil) ⇒ Object
15 16 17 18 |
# File 'lib/moab/config.rb', line 15 def storage_roots(new_value = nil) @storage_roots = new_value if new_value @storage_roots end |
#storage_trunk(new_value = nil) ⇒ Object
20 21 22 23 |
# File 'lib/moab/config.rb', line 20 def storage_trunk(new_value = nil) @storage_trunk = new_value if new_value @storage_trunk end |