Class: Databasedotcom::Client
- Inherits:
-
Object
- Object
- Databasedotcom::Client
- Defined in:
- lib/caviidae/databasedotcom/client.rb
Instance Method Summary collapse
- #cleanup ⇒ Object
- #create(class_or_classname, object_attrs) ⇒ Object
- #created ⇒ Object
- #original_create ⇒ Object
- #store(sobject) ⇒ Object
Instance Method Details
#cleanup ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/caviidae/databasedotcom/client.rb', line 17 def cleanup created.each do |sobject| sobject.delete sobject = nil end @created = [] end |
#create(class_or_classname, object_attrs) ⇒ Object
7 8 9 10 11 |
# File 'lib/caviidae/databasedotcom/client.rb', line 7 def create(class_or_classname, object_attrs) new_object = original_create(class_or_classname, object_attrs) store(new_object) new_object end |
#created ⇒ Object
25 26 27 |
# File 'lib/caviidae/databasedotcom/client.rb', line 25 def created @created ||= [] end |
#original_create ⇒ Object
6 |
# File 'lib/caviidae/databasedotcom/client.rb', line 6 alias :original_create :create |
#store(sobject) ⇒ Object
13 14 15 |
# File 'lib/caviidae/databasedotcom/client.rb', line 13 def store(sobject) created << sobject end |