Class: ActiveBlur::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/active_blur/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
8
# File 'lib/active_blur/config.rb', line 5

def initialize
  self.thrift_options={}
  self.options={}
end

Instance Attribute Details

#connection_strObject

Returns the value of attribute connection_str.



3
4
5
# File 'lib/active_blur/config.rb', line 3

def connection_str
  @connection_str
end

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/active_blur/config.rb', line 3

def options
  @options
end

#thrift_optionsObject

Returns the value of attribute thrift_options.



3
4
5
# File 'lib/active_blur/config.rb', line 3

def thrift_options
  @thrift_options
end

Instance Method Details

#errorsObject



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

Returns:

  • (Boolean)


14
15
16
# File 'lib/active_blur/config.rb', line 14

def invalid?
  connection_str.nil?
end

#valid?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/active_blur/config.rb', line 10

def valid?
  !invalid?
end