Sha256: 110a85e185ca1c8df1ccbe3c2e0df4fa0b5f4d1d061121a29a87c9d31924dcd7
Contents?: true
Size: 470 Bytes
Versions: 2
Compression:
Stored size: 470 Bytes
Contents
module Tracebin class Config DEFAULTS = { log_level: 'info', host: 'https://traceb.in', report_path: 'reports', 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tracebin-0.0.10 | lib/tracebin/config.rb |
tracebin-0.0.9 | lib/tracebin/config.rb |