Module: Aqua::Store::CouchDB::StorageMethods::ClassMethods

Public Visibility

Public Instance Method Summary

#create(hash)

Initializes a new storage document and saves it without raising any errors.

Returns: Aqua::Storage

#create!(hash)

Initializes a new storage document and saves it raising any errors.

Returns: Aqua::Storage

Public Instance Method Details

create

public Aqua::Storage create(hash)

Initializes a new storage document and saves it without raising any errors

Meta Tags

Returns:

[Aqua::Storage, false]

On success it returns an aqua storage object. On failure it returns false.

[View source]


29
30
31
32
# File 'lib/aqua/store/couch_db/storage_methods.rb', line 29

def create( hash )
  doc = new( hash )
  doc.save
end

create!

public Aqua::Storage create!(hash)

Initializes a new storage document and saves it raising any errors.

Meta Tags

Returns:

[Aqua::Storage]

On success it returns an aqua storage object.

Raises:

[Object]

Any of the CouchDB exceptions

[View source]


41
42
43
44
# File 'lib/aqua/store/couch_db/storage_methods.rb', line 41

def create!( hash )
  doc = new( hash )
  doc.save!
end
Generated on Thursday, August 27 2009 at 05:50:23 PM by YARD 0.2.3.5 (ruby-1.8.6).