Class: Tracebin::Config
- Inherits:
-
Object
- Object
- Tracebin::Config
- Defined in:
- lib/tracebin/config.rb
Constant Summary collapse
- DEFAULTS =
{ log_level: 'info', host: 'https://traceb.in', report_path: 'reports', enable_ssl: true, ignored_paths: [], enabled: true, report_frequency: 60, report_retry_limit: 10 }.freeze
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config = {}) ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 22 23 |
# File 'lib/tracebin/config.rb', line 16 def initialize(config = {}) opts = DEFAULTS.merge config opts.keys.each do |key| if self.respond_to? key self.instance_variable_set "@#{key}", opts[key] end end end |