Sha256: 5286f170ce9ed931f1039789e5f718aca9aa15bd591ad56c244e156708a58bbd
Contents?: true
Size: 566 Bytes
Versions: 2
Compression:
Stored size: 566 Bytes
Contents
require "singleton" require "yaml" module Kharon # Simple wrapper for the configuration. # @author Vincent Courtois <courtois.vincent@outlook.com> class Configuration include Singleton attr_accessor :configuration # Constructor of the configuration, initializes default values for each usable key. def initialize @configuration = { exceptions: true } end def use_exceptions(use = true) @configuration[:exceptions] = use end def uses_exceptions? @configuration[:exceptions] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kharon-0.5.1 | lib/kharon/configuration.rb |
kharon-0.5.0 | lib/kharon/configuration.rb |