Sha256: 090953a71d59899229812bedc98585006a2a690d15a110e1ba9db64f3a4802be
Contents?: true
Size: 747 Bytes
Versions: 15
Compression:
Stored size: 747 Bytes
Contents
require 'singleton' module Brief class Configuration include Singleton def self.method_missing(meth, *args, &block) if instance.respond_to?(meth) instance.send(meth, *args, &block) else super end end def current @current ||= { docs_path: 'docs', models_path: 'models' }.to_mash end def set(attribute, value = nil) current[attribute] = value self end def method_missing(meth, *args, &block) if current.respond_to?(meth) && current.key?(meth) current.send(meth, *args, &block) else # swallow invalid method calls in production super if ENV['BRIEF_DEBUG_MODE'] nil end end end end
Version data entries
15 entries across 15 versions & 1 rubygems