Class: Cylons::Config
- Inherits:
-
ActiveSupport::InheritableOptions
- Object
- ActiveSupport::InheritableOptions
- Cylons::Config
- Defined in:
- lib/cylons/config.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Config
constructor
A new instance of Config.
- #registry ⇒ Object
Constructor Details
#initialize(*args) ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cylons/config.rb', line 7 def initialize(*args) super(*args) self[:address] ||= ::Cylons::Interface.primary self[:port] ||= (9000 + rand(100)) self[:logger] ||= ::Cylons::Logging.logger self[:model_paths] ||= nil self[:registry] ||= nil self[:registry_adapter] ||= :zk self[:registry_port] ||= nil self[:remote_namespace] ||= nil self[:remote_connection_failure_timeout] ||= 10 self[:remote_connection_failure_threshold] ||= 2 end |
Instance Method Details
#registry ⇒ Object
22 23 24 |
# File 'lib/cylons/config.rb', line 22 def registry @registry ||= ::Cylons::RegistryAdapter.send(self[:registry_adapter]) end |