Class: FcrepoWrapper::Settings

Inherits:
Delegator
  • Object
show all
Defined in:
lib/fcrepo_wrapper/settings.rb

Overview

Configuraton that comes from static and dynamic sources.

Instance Method Summary collapse

Constructor Details

#initialize(static_config) ⇒ Settings

Returns a new instance of Settings.



15
16
17
18
# File 'lib/fcrepo_wrapper/settings.rb', line 15

def initialize(static_config)
  super
  @static_config = static_config
end

Instance Method Details

#__getobj__Object Also known as: static_config



5
6
7
# File 'lib/fcrepo_wrapper/settings.rb', line 5

def __getobj__
  @static_config # return object we are delegating to, required
end

#__setobj__(obj) ⇒ Object



11
12
13
# File 'lib/fcrepo_wrapper/settings.rb', line 11

def __setobj__(obj)
  @static_config = obj
end

#portObject

Get the port this fcrepo instance is running at



22
23
24
25
# File 'lib/fcrepo_wrapper/settings.rb', line 22

def port
  @port ||= static_config.port
  @port ||= random_open_port.to_s
end