Sha256: cc039c0878ae8304d81c082aa1dcb64885fda856487992348583a208ebe753a2
Contents?: true
Size: 535 Bytes
Versions: 4
Compression:
Stored size: 535 Bytes
Contents
# TODO [AK 09/12/12] maybe we should use ActiveSupport::Configurable ? require 'active_support/core_ext/module/attribute_accessors' module Valle module Configuration mattr_accessor :options self.options = { enabled: true, # gem is enabled by default models: nil # nil means to select all the AR models } def configure yield self end def enabled=(value) self.options[:enabled] = value end def models=(collection) self.options[:models] = collection end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
valle-0.1.0 | lib/valle/configuration.rb |
valle-0.0.3 | lib/valle/configuration.rb |
valle-0.0.2 | lib/valle/configuration.rb |
valle-0.0.1 | lib/valle/configuration.rb |