Class: Ciql::Configuration
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Ciql::Configuration
- Defined in:
- lib/ciql/configuration.rb
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_options ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 |
# File 'lib/ciql/configuration.rb', line 19 def initialize super self.hosts = [] end |
Instance Method Details
#to_options ⇒ Object
24 25 26 27 28 29 |
# File 'lib/ciql/configuration.rb', line 24 def all = [host].concat(hosts).compact.reject(&:empty?) self.hosts = [] self.host = all.join(',') unless all.empty? self.marshal_dump.dup.tap { |hash| hash.delete(:hosts) } end |