module Aflexi::Crud::ClassMethods

Public Instance Methods

count(conditions = {}) click to toggle source
# File lib/aflexi/crud.rb, line 8
def count(conditions = {})
  api_call "count", conditions
end
create(hash) click to toggle source
# File lib/aflexi/crud.rb, line 17
def create(hash)
  api_call "create", hash
end
destroy(id) click to toggle source
# File lib/aflexi/crud.rb, line 25
def destroy(id)
  api_call "delete", id
end
get(conditions = {}) click to toggle source
# File lib/aflexi/crud.rb, line 12
def get(conditions = {})
  results = api_call("get", conditions)["results"]
  results.map { |hash| new hash }
end
update(id, hash) click to toggle source
# File lib/aflexi/crud.rb, line 21
def update(id, hash)
  api_call "update", id, hash
end