Sha256: 20d53ad6868498bcd1e5460e46421a16be1a03dc2d1226e8ab2b9075e8dafb52
Contents?: true
Size: 530 Bytes
Versions: 8
Compression:
Stored size: 530 Bytes
Contents
module Hancock::PluginConfiguration module ClassMethods def configuration @configuration ||= config_class.new if config_class end def config @configuration ||= config_class.new if config_class end def configure yield configuration end def reconfigure! if config_class @configuration = config_class.new configure &block if block_given? end end def config_class end end def self.included(base) base.extend(ClassMethods) end end
Version data entries
8 entries across 8 versions & 1 rubygems