Sha256: 0a4f533280d073fe8dcf3910d0d4e73b814bb09736faa6ca80f2a43adfc3ccb7
Contents?: true
Size: 661 Bytes
Versions: 3
Compression:
Stored size: 661 Bytes
Contents
module Serialbar module Adapter module InstanceMethods end module ClassMethods def foo end def configure_adapter(type,classname="DataFile") base = const_get classname load_adapter(base,type) end 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 end def self.included(base) base.extend(ClassMethods) base.send :include, InstanceMethods end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
serialbar-0.0.3 | lib/serialbar/adapter.rb |
serialbar-0.0.2 | lib/serialbar/adapter.rb |
serialbar-0.0.1 | lib/serialbar/adapter.rb |