Class: Dor::StaticConfig::StacksConfig

Inherits:
Object
  • Object
show all
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.



7
8
9
10
11
12
# File 'lib/dor/static_config/stacks_config.rb', line 7

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



14
15
16
# File 'lib/dor/static_config/stacks_config.rb', line 14

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

#document_cache_host(new_value = nil) ⇒ Object



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

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



33
34
35
36
# File 'lib/dor/static_config/stacks_config.rb', line 33

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



23
24
25
26
# File 'lib/dor/static_config/stacks_config.rb', line 23

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



28
29
30
31
# File 'lib/dor/static_config/stacks_config.rb', line 28

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