Class: Dor::StaticConfig::StacksConfig

Inherits:
Object
  • Object
show all
Extended by:
Deprecation
Defined in:
lib/dor/static_config/stacks_config.rb

Overview

Represents the configuration for the shared filesystem direcotories

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ StacksConfig

Returns a new instance of StacksConfig.



10
11
12
13
14
15
# File 'lib/dor/static_config/stacks_config.rb', line 10

def initialize(hash)
  @document_cache_host = hash.fetch(:document_cache_host)
  @local_stacks_root = hash.fetch(:local_stacks_root)
  @local_workspace_root = hash.fetch(:local_workspace_root)
  @local_document_cache_root = hash.fetch(:local_document_cache_root)
end

Instance Method Details

#configure(&block) ⇒ Object



17
18
19
# File 'lib/dor/static_config/stacks_config.rb', line 17

def configure(&block)
  instance_eval(&block)
end

#document_cache_host(new_value = nil) ⇒ Object



21
22
23
24
# File 'lib/dor/static_config/stacks_config.rb', line 21

def document_cache_host(new_value = nil)
  @document_cache_host = new_value if new_value
  @document_cache_host
end

#local_document_cache_root(new_value = nil) ⇒ Object



36
37
38
39
# File 'lib/dor/static_config/stacks_config.rb', line 36

def local_document_cache_root(new_value = nil)
  @local_document_cache_root = new_value if new_value
  @local_document_cache_root
end

#local_stacks_root(new_value = nil) ⇒ Object



26
27
28
29
# File 'lib/dor/static_config/stacks_config.rb', line 26

def local_stacks_root(new_value = nil)
  @local_stacks_root = new_value if new_value
  @local_stacks_root
end

#local_workspace_root(new_value = nil) ⇒ Object



31
32
33
34
# File 'lib/dor/static_config/stacks_config.rb', line 31

def local_workspace_root(new_value = nil)
  @local_workspace_root = new_value if new_value
  @local_workspace_root
end