Class: CassandraIntegration::Config

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

Constant Summary collapse

@@extended_models =
[]

Class Method Summary collapse

Class Method Details

.app_idObject



20
21
22
# File 'lib/cassandra_integration/config.rb', line 20

def app_id
  @@config[RAILS_ENV]['app_id']
end

.configure(yaml) ⇒ Object



8
9
10
# File 'lib/cassandra_integration/config.rb', line 8

def configure(yaml)
  @@config = YAML::load(File.read(yaml))
end

.connect_timeoutObject



36
37
38
# File 'lib/cassandra_integration/config.rb', line 36

def connect_timeout
  @@config[RAILS_ENV]['connect_timeout'] || 10
end

.extended_modelsObject



40
41
42
# File 'lib/cassandra_integration/config.rb', line 40

def extended_models
  @@extended_models
end

.extended_models=(value) ⇒ Object



44
45
46
# File 'lib/cassandra_integration/config.rb', line 44

def extended_models=(value)
  @@extended_models << value
end

.hostObject



12
13
14
# File 'lib/cassandra_integration/config.rb', line 12

def host
  @@config[RAILS_ENV]['host']
end

.keyspaceObject



16
17
18
# File 'lib/cassandra_integration/config.rb', line 16

def keyspace
  @@config[RAILS_ENV]['keyspace']
end

.other_apps_idsObject



24
25
26
# File 'lib/cassandra_integration/config.rb', line 24

def other_apps_ids
  @@config[RAILS_ENV]['other_apps_ids']
end

.retriesObject



28
29
30
# File 'lib/cassandra_integration/config.rb', line 28

def retries
  @@config[RAILS_ENV]['retries'] || 3
end

.timeoutObject



32
33
34
# File 'lib/cassandra_integration/config.rb', line 32

def timeout
  @@config[RAILS_ENV]['timeout'] || 10
end