Module: Serialbar::Adapter::ClassMethods
- Defined in:
- lib/serialbar/adapter.rb
Instance Method Summary collapse
- #configure_adapter(type, classname = "DataFile") ⇒ Object
- #foo ⇒ Object
- #load_adapter(base, type) ⇒ Object
Instance Method Details
#configure_adapter(type, classname = "DataFile") ⇒ Object
11 12 13 14 |
# File 'lib/serialbar/adapter.rb', line 11 def configure_adapter(type,classname="DataFile") base = const_get classname load_adapter(base,type) end |
#foo ⇒ Object
8 9 |
# File 'lib/serialbar/adapter.rb', line 8 def foo end |
#load_adapter(base, type) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/serialbar/adapter.rb', line 16 def load_adapter(base,type) # load module based on type case type when :mongoid require 'serialbar/adapters/mongoid' mod = Mongoid::Document when :filesystem require 'serialbar/adapters/file_system' end base.send :include, mod end |