Class: Thincloud::Resque::Configuration
- Inherits:
-
Object
- Object
- Thincloud::Resque::Configuration
- Defined in:
- lib/thincloud/resque/configuration.rb
Overview
Public: Configuration options for the Thincloud::Resque module
Instance Attribute Summary collapse
-
#mailer_environments ⇒ Object
Returns the value of attribute mailer_environments.
-
#redis_driver ⇒ Object
Returns the value of attribute redis_driver.
-
#redis_namespace ⇒ Object
Returns the value of attribute redis_namespace.
-
#redis_url ⇒ Object
Returns the value of attribute redis_url.
-
#web_password ⇒ Object
Returns the value of attribute web_password.
-
#web_username ⇒ Object
Returns the value of attribute web_username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/thincloud/resque/configuration.rb', line 22 def initialize url = ENV["REDIS_URL"] || "unix:///tmp/redis.sock" username = ENV["RESQUE_WEB_USERNAME"] || "thincloud-resque" password = ENV["RESQUE_WEB_PASSWORD"] || "thincloud-resque" @redis_url ||= url @redis_namespace ||= "resque" @redis_driver ||= "ruby" @web_username ||= username @web_password ||= password @mailer_environments ||= [:production] end |
Instance Attribute Details
#mailer_environments ⇒ Object
Returns the value of attribute mailer_environments.
20 21 22 |
# File 'lib/thincloud/resque/configuration.rb', line 20 def mailer_environments @mailer_environments end |
#redis_driver ⇒ Object
Returns the value of attribute redis_driver.
17 18 19 |
# File 'lib/thincloud/resque/configuration.rb', line 17 def redis_driver @redis_driver end |
#redis_namespace ⇒ Object
Returns the value of attribute redis_namespace.
16 17 18 |
# File 'lib/thincloud/resque/configuration.rb', line 16 def redis_namespace @redis_namespace end |
#redis_url ⇒ Object
Returns the value of attribute redis_url.
15 16 17 |
# File 'lib/thincloud/resque/configuration.rb', line 15 def redis_url @redis_url end |
#web_password ⇒ Object
Returns the value of attribute web_password.
19 20 21 |
# File 'lib/thincloud/resque/configuration.rb', line 19 def web_password @web_password end |
#web_username ⇒ Object
Returns the value of attribute web_username.
18 19 20 |
# File 'lib/thincloud/resque/configuration.rb', line 18 def web_username @web_username end |