class Mince::Config
Configuration for Mince
¶ ↑
Mince
can be configured to interact with different mince supported data interfaces.
Simply run the following to specify the data interface to use
Mince::Config.interface = Mince::MyDb::Interface
This is a singleton object in order to prevent multiple instances of this object from being used.
Attributes
interface[RW]
Public Class Methods
interface()
click to toggle source
Returns the interface that is configured to be used. Use this method instead of hard coding which mince interface to use throughout your code so that you can change mince interfaces as needed.
# File lib/mince/config.rb, line 29 def self.interface instance.interface end
interface=(interface)
click to toggle source
Sets the singleton’s interface attribute so that you can change your storage strategy without changing all references to that class.
@param [Class] interface the Mince
Supported Interface class
# File lib/mince/config.rb, line 22 def self.interface=(interface) instance.interface = interface end