class RLMRealm
Public Class Methods
write(&block)
click to toggle source
# File lib/project/realm/realm.rb, line 27 def self.write(&block) realm = RLMRealm.defaultRealm error_ptr = Pointer.new(:object) realm.start_writing block.call(realm) saved = realm.end_writing(error_ptr) { saved: saved, error: error_ptr[0] } end
Public Instance Methods
<<(object)
click to toggle source
# File lib/project/realm/realm.rb, line 38 def <<(object) self.addObject(object) end
add_notification(&block)
click to toggle source
# File lib/project/realm/realm.rb, line 19 def add_notification(&block) self.addNotificationBlock(block) end
delete(object)
click to toggle source
# File lib/project/realm/realm.rb, line 15 def delete(object) self.deleteObject(object) end
end_writing(error_ptr=nil)
click to toggle source
# File lib/project/realm/realm.rb, line 11 def end_writing(error_ptr=nil) self.commitWriteTransaction(error_ptr) end
remove_notification(token)
click to toggle source
# File lib/project/realm/realm.rb, line 23 def remove_notification(token) self.removeNotification(token) end