Class: ActiveBlur::Config
- Inherits:
-
Object
- Object
- ActiveBlur::Config
- Defined in:
- lib/active_blur/config.rb
Instance Attribute Summary collapse
-
#connection_str ⇒ Object
Returns the value of attribute connection_str.
-
#options ⇒ Object
Returns the value of attribute options.
-
#thrift_options ⇒ Object
Returns the value of attribute thrift_options.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 8 |
# File 'lib/active_blur/config.rb', line 5 def initialize self.={} self.={} end |
Instance Attribute Details
#connection_str ⇒ Object
Returns the value of attribute connection_str.
3 4 5 |
# File 'lib/active_blur/config.rb', line 3 def connection_str @connection_str end |
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/active_blur/config.rb', line 3 def @options end |
#thrift_options ⇒ Object
Returns the value of attribute thrift_options.
3 4 5 |
# File 'lib/active_blur/config.rb', line 3 def @thrift_options end |
Instance Method Details
#errors ⇒ Object
18 19 20 21 22 23 |
# File 'lib/active_blur/config.rb', line 18 def errors return nil if valid? errors = [] errors << "connection_str cannot be nil" if connection_str.nil? errors.join("\n") end |
#invalid? ⇒ Boolean
14 15 16 |
# File 'lib/active_blur/config.rb', line 14 def invalid? connection_str.nil? end |
#valid? ⇒ Boolean
10 11 12 |
# File 'lib/active_blur/config.rb', line 10 def valid? !invalid? end |