daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class AbstractAdapter
  2.  
  3.   # single-instance methods
  4.   def create(repo, instance)
  5.  
  6.   def read(repo, instance)
  7.  
  8.   def update(repo, instance)
  9.  
  10.   def delete(repo, instance)
  11.  
  12.   # non-instance methods (PKEY or search params)
  13.   def read_one(repo, klass, *keys)
  14.  
  15.   def read_set(repo, klass, query)
  16.  
  17.   def delete_one(repo, klass, *keys)
  18.  
  19.   def delete_set(repo, klass, query)
  20.  
  21.   # other methods (helpers
  22.  
  23.   def first(repo, klass, query)
  24.     read_set(repo, klass, query.merge(:limit => 1)
  25.   end
  26.  
  27. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top