Class: AppMonit::Config
- Inherits:
-
Object
- Object
- AppMonit::Config
- Defined in:
- lib/app_monit/config.rb
Class Attribute Summary collapse
- .api_key ⇒ Object
-
.async ⇒ Object
writeonly
Sets the attribute async.
-
.enabled ⇒ Object
writeonly
Sets the attribute enabled.
- .end_point ⇒ Object
- .env ⇒ Object
- .fail_silent ⇒ Object
- .flush_rate ⇒ Object
- .log_level ⇒ Object
- .timeout ⇒ Object
- .version ⇒ Object
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object
6 7 8 |
# File 'lib/app_monit/config.rb', line 6 def api_key @api_key || raise(ApiKeyNotSetError.new("Please set your API key")) end |
.async=(value) ⇒ Object (writeonly)
Sets the attribute async
4 5 6 |
# File 'lib/app_monit/config.rb', line 4 def async=(value) @async = value end |
.enabled=(value) ⇒ Object (writeonly)
Sets the attribute enabled
4 5 6 |
# File 'lib/app_monit/config.rb', line 4 def enabled=(value) @enabled = value end |
.end_point ⇒ Object
14 15 16 |
# File 'lib/app_monit/config.rb', line 14 def end_point @end_point || "https://api.appmon.it" end |
.env ⇒ Object
10 11 12 |
# File 'lib/app_monit/config.rb', line 10 def env @env || "development" end |
.fail_silent ⇒ Object
22 23 24 |
# File 'lib/app_monit/config.rb', line 22 def fail_silent @fail_silent || false end |
.flush_rate ⇒ Object
38 39 40 |
# File 'lib/app_monit/config.rb', line 38 def flush_rate @flush_rate || 60 end |
.log_level ⇒ Object
30 31 32 |
# File 'lib/app_monit/config.rb', line 30 def log_level @log_level || Logger::DEBUG end |
.timeout ⇒ Object
42 43 44 |
# File 'lib/app_monit/config.rb', line 42 def timeout @timeout || 1 end |
.version ⇒ Object
18 19 20 |
# File 'lib/app_monit/config.rb', line 18 def version @version || "v1" end |
Class Method Details
.async? ⇒ Boolean
34 35 36 |
# File 'lib/app_monit/config.rb', line 34 def async? @async end |
.enabled? ⇒ Boolean
26 27 28 |
# File 'lib/app_monit/config.rb', line 26 def enabled? @enabled.nil? ? env != "test" : @enabled end |