README.md in cistern-0.11.2.pre2 vs README.md in cistern-0.11.2

- old
+ new

@@ -206,11 +206,11 @@ Patient::Mock.store_in(:hash) ``` ### Model -* `service` represents the associated `Foo::Client` instance. +* `connection` represents the associated `Foo::Client` instance. * `collection` represents the related collection (if applicable) Example ```ruby @@ -223,11 +223,11 @@ def destroy params = { "id" => self.identity } - self.service.destroy_bar(params).body["request"] + self.connection.destroy_bar(params).body["request"] end def save requires :keypair_id @@ -237,15 +237,15 @@ "flavor" => self.flavor, }, } if new_record? - merge_attributes(service.create_bar(params).body["bar"]) + merge_attributes(connection.create_bar(params).body["bar"]) else requires :identity - merge_attributes(service.update_bar(params).body["bar"]) + merge_attributes(connection.update_bar(params).body["bar"]) end end end ``` @@ -284,11 +284,11 @@ class Foo::Client::Bars < Cistern::Collection model Foo::Client::Bar def all(params = {}) - response = service.get_bars(params) + response = connection.get_bars(params) data = response.body self.load(data["bars"]) # store bar records in collection self.merge_attributes(data) # store any other attributes of the response on the collection @@ -298,14 +298,14 @@ params = { "provisioned_id" => provisioned_id, } params.merge!("location" => options[:location]) if options.key?(:location) - service.requests.new(service.discover_bar(params).body["request"]) + connection.requests.new(connection.discover_bar(params).body["request"]) end def get(id) - if data = service.get_bar("id" => id).body["bar"] + if data = connection.get_bar("id" => id).body["bar"] new(data) else nil end end