Class: Ksql::Configuration
- Inherits:
-
Object
- Object
- Ksql::Configuration
- Defined in:
- lib/ksql/configuration.rb
Overview
Ksql configuration
Constant Summary collapse
- REQUIRED_ATTRS =
%i[host].freeze
- OPTIONAL_ATTRS =
%i[auth].freeze
Instance Method Summary collapse
-
#validate ⇒ Boolean
Ensure required attributes are properly configured.
Instance Method Details
#validate ⇒ Boolean
Ensure required attributes are properly configured
20 21 22 23 24 25 26 27 |
# File 'lib/ksql/configuration.rb', line 20 def validate REQUIRED_ATTRS.each do |attribute| value = instance_variable_get("@#{attribute}") raise ConfigurationError, "Ksql required #{attribute} missing!" if value.nil? || value.strip.empty? end true end |