Module: ShadyDB::Persistence::ClassMethods
- Defined in:
- lib/shadydb/persistence.rb
Instance Method Summary collapse
Instance Method Details
#create(attribs = {}) ⇒ Object
21 22 23 24 |
# File 'lib/shadydb/persistence.rb', line 21 def create(attribs = {}) document = new(attribs) document.save && document end |
#data_directory ⇒ Object
26 27 28 |
# File 'lib/shadydb/persistence.rb', line 26 def data_directory File.join(ShadyDB.configuration.data_directory, self.model_name.plural) end |