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.
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 |
#port ⇒ Object
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 |