Class: CassandraIntegration::Config
- Inherits:
-
Object
- Object
- CassandraIntegration::Config
- Defined in:
- lib/cassandra_integration/config.rb
Constant Summary collapse
- @@extended_models =
[]
Class Method Summary collapse
- .app_id ⇒ Object
- .configure(yaml) ⇒ Object
- .connect_timeout ⇒ Object
- .extended_models ⇒ Object
- .extended_models=(value) ⇒ Object
- .host ⇒ Object
- .keyspace ⇒ Object
- .other_apps_ids ⇒ Object
- .retries ⇒ Object
- .timeout ⇒ Object
Class Method Details
.app_id ⇒ Object
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_timeout ⇒ Object
36 37 38 |
# File 'lib/cassandra_integration/config.rb', line 36 def connect_timeout @@config[RAILS_ENV]['connect_timeout'] || 10 end |
.extended_models ⇒ Object
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 |
.host ⇒ Object
12 13 14 |
# File 'lib/cassandra_integration/config.rb', line 12 def host @@config[RAILS_ENV]['host'] end |
.keyspace ⇒ Object
16 17 18 |
# File 'lib/cassandra_integration/config.rb', line 16 def keyspace @@config[RAILS_ENV]['keyspace'] end |
.other_apps_ids ⇒ Object
24 25 26 |
# File 'lib/cassandra_integration/config.rb', line 24 def other_apps_ids @@config[RAILS_ENV]['other_apps_ids'] end |
.retries ⇒ Object
28 29 30 |
# File 'lib/cassandra_integration/config.rb', line 28 def retries @@config[RAILS_ENV]['retries'] || 3 end |
.timeout ⇒ Object
32 33 34 |
# File 'lib/cassandra_integration/config.rb', line 32 def timeout @@config[RAILS_ENV]['timeout'] || 10 end |