Class: FcrepoWrapper::Settings
- Inherits:
-
Delegator
- Object
- Delegator
- FcrepoWrapper::Settings
- Defined in:
- lib/fcrepo_wrapper/settings.rb
Overview
Configuraton that comes from static and dynamic sources.
Instance Method Summary collapse
- #__getobj__ ⇒ Object (also: #static_config)
- #__setobj__(obj) ⇒ Object
-
#initialize(static_config) ⇒ Settings
constructor
A new instance of Settings.
-
#port ⇒ Object
Get the port this fcrepo instance is running at.
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 |
#port ⇒ Object
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 |