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.



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

def initialize(static_config)
  super
  @static_config = static_config
end

Instance Method Details

#__getobj__Object Also known as: static_config



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

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

#__setobj__(obj) ⇒ Object



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

def __setobj__(obj)
  @static_config = obj
end

#portObject

Get the port this fcrepo instance is running at



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

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