Module: Ghee::CUD

Instance Method Summary collapse

Instance Method Details

#create(attributes, &block) ⇒ Object

Creates

return json



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

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

#destroy(&block) ⇒ Object

Destroys

return boolean



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

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

#patch(attributes, &block) ⇒ Object

Patchs

return json



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

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