Class: Leadtune::Config
- Inherits:
-
Object
- Object
- Leadtune::Config
- Defined in:
- lib/leadtune/config.rb
Overview
:nodoc:all
Constant Summary collapse
- @@leadtune_host =
nil
- @@api_key =
nil
- @@organization =
nil
- @@timeout =
nil
- @@query_params =
nil
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#leadtune_host ⇒ Object
Returns the value of attribute leadtune_host.
-
#query_params ⇒ Object
Returns the value of attribute query_params.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Class Method Summary collapse
- .api_key=(api_key) ⇒ Object
- .leadtune_host=(leadtune_host) ⇒ Object
- .organization=(organization) ⇒ Object
- .query_params=(query_params) ⇒ Object
- .timeout=(timeout) ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/leadtune/config.rb', line 10 def api_key @api_key end |
#environment ⇒ Object
Returns the value of attribute environment.
10 11 12 |
# File 'lib/leadtune/config.rb', line 10 def environment @environment end |
#leadtune_host ⇒ Object
Returns the value of attribute leadtune_host.
10 11 12 |
# File 'lib/leadtune/config.rb', line 10 def leadtune_host @leadtune_host end |
#query_params ⇒ Object
Returns the value of attribute query_params.
10 11 12 |
# File 'lib/leadtune/config.rb', line 10 def query_params @query_params end |
#timeout ⇒ Object
Returns the value of attribute timeout.
10 11 12 |
# File 'lib/leadtune/config.rb', line 10 def timeout @timeout end |
Class Method Details
.api_key=(api_key) ⇒ Object
18 19 20 |
# File 'lib/leadtune/config.rb', line 18 def self.api_key=(api_key) @@api_key = api_key end |
.leadtune_host=(leadtune_host) ⇒ Object
26 27 28 |
# File 'lib/leadtune/config.rb', line 26 def self.leadtune_host=(leadtune_host) @@leadtune_host = leadtune_host end |
.organization=(organization) ⇒ Object
22 23 24 |
# File 'lib/leadtune/config.rb', line 22 def self.organization=(organization) @@organization = organization end |
.query_params=(query_params) ⇒ Object
34 35 36 |
# File 'lib/leadtune/config.rb', line 34 def self.query_params=(query_params) @@query_params = query_params end |
.timeout=(timeout) ⇒ Object
30 31 32 |
# File 'lib/leadtune/config.rb', line 30 def self.timeout=(timeout) @@timeout = timeout end |
Instance Method Details
#organization ⇒ Object
50 51 52 |
# File 'lib/leadtune/config.rb', line 50 def organization @@organization end |
#production_environment_detected? ⇒ Boolean
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/leadtune/config.rb', line 62 def production_environment_detected? if ENV.include?("APP_ENV") "production" == ENV["APP_ENV"] else defined?(Rails) && "production" == Rails.env || "production" == ENV["RACK_ENV"] || "production" == ENV["RAILS_ENV"] || defined?(RAILS_ENV) && "production" == RAILS_ENV end end |