Module: Bluplate::Persist::Base

Included in:
Inbox, Task, User
Defined in:
lib/bluplate/persist.rb

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

#saveObject



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