Module: Bluplate::Persist::Base
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
13 14 15 |
# File 'lib/bluplate/persist.rb', line 13 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#save ⇒ Object
9 10 11 |
# File 'lib/bluplate/persist.rb', line 9 def save self.class.db.collection(self.class.to_s.downcase.pluralize).insert(self.to_hash) end |