Module: Ghee::CUD

Instance Method Summary collapse

Instance Method Details

#create(attributes) ⇒ Object

Creates

return json



8
9
10
# File 'lib/ghee/state_methods.rb', line 8

def create(attributes)
  connection.post(path_prefix,attributes).body
end

#destroyObject

Destroys

return boolean



24
25
26
# File 'lib/ghee/state_methods.rb', line 24

def destroy
  connection.delete(path_prefix).status == 204
end

#patch(attributes) ⇒ Object

Patchs

return json



16
17
18
# File 'lib/ghee/state_methods.rb', line 16

def patch(attributes)
  connection.patch(path_prefix, attributes).body
end