Permalink
Browse files

Adds create for all CollectionResources

  • Loading branch information...
1 parent 44e1783 commit d2e05db33ae4620f33b4a0ed1f50a3b6628ba7e7 @vesan committed Apr 1, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/kippt/collection_resource.rb
@@ -9,6 +9,10 @@ def build(attributes = {})
object_class.new(attributes, client)
end
+ def create(attributes = {})
+ build(attributes).save
+ end
+
def [](resource_id)
response = client.get("#{base_uri}/#{resource_id}")
if response.success?

0 comments on commit d2e05db

Please sign in to comment.