Method: Ablab::ModuleMethods#store
- Defined in:
- lib/ablab.rb
#store(type, *args) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/ablab.rb', line 25 def store(type, *args) if type.is_a? Class @tracker = Class.new(*args) else class_name = type.to_s.split('_').map(&:capitalize).join @tracker = Ablab::Store.const_get(class_name).new(*args) end end |