Sha256: 5045c39d8766cf6c9b953eaee2f42d730741d41c5a7e0baf33d7f7bdd18fb409
Contents?: true
Size: 494 Bytes
Versions: 1
Compression:
Stored size: 494 Bytes
Contents
module Tracebin class Config DEFAULTS = { log_level: 'info', host: 'https://traceb.in', report_path: 'reports', enable_ssl: true, ignored_paths: [], enabled: true }.freeze attr_accessor *(DEFAULTS.keys + [:bin_id]) 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 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tracebin-0.0.11 | lib/tracebin/config.rb |