Class: Messagebus::Swarm::Controller::ConfigurationSource
- Inherits:
-
Struct
- Object
- Struct
- Messagebus::Swarm::Controller::ConfigurationSource
- Defined in:
- lib/messagebus/swarm/controller.rb
Instance Attribute Summary collapse
-
#configuration_type ⇒ Object
Returns the value of attribute configuration_type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#configuration_type ⇒ Object
Returns the value of attribute configuration_type
41 42 43 |
# File 'lib/messagebus/swarm/controller.rb', line 41 def configuration_type @configuration_type end |
#value ⇒ Object
Returns the value of attribute value
41 42 43 |
# File 'lib/messagebus/swarm/controller.rb', line 41 def value @value end |
Instance Method Details
#configuration_hash ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/messagebus/swarm/controller.rb', line 42 def configuration_hash case configuration_type when :path YAML.load_file(value) when :eval eval(value) when :default Messagebus::Swarm.default_configuration else raise "Unsupported configuration type #{configuration_type}" end end |