@@ -43,8 +43,8 @@ def save!(options = {})
4343 end
4444
4545 # Saves, returning false if it fails and attaching the errors
46- def save ( options = { } , &block )
47- save! ( options , &block )
46+ def save ( options = { } , &)
47+ save! ( options , &)
4848 rescue ZendeskAPI ::Error ::RecordInvalid => e
4949 @errors = e . errors
5050 false
@@ -127,8 +127,8 @@ def find!(client, options = {})
127127 # Finds, returning nil if it fails
128128 # @param [Client] client The {Client} object to be used
129129 # @param [Hash] options Any additional GET parameters to be added
130- def find ( client , options = { } , &block )
131- find! ( client , options , &block )
130+ def find ( client , options = { } , &)
131+ find! ( client , options , &)
132132 rescue ZendeskAPI ::Error ::ClientError
133133 nil
134134 end
@@ -157,8 +157,8 @@ def create!(client, attributes = {}, &block)
157157 # Creates, returning nil if it fails
158158 # @param [Client] client The {Client} object to be used
159159 # @param [Hash] options Any additional GET parameters to be added
160- def create ( client , attributes = { } , &block )
161- create! ( client , attributes , &block )
160+ def create ( client , attributes = { } , &)
161+ create! ( client , attributes , &)
162162 rescue ZendeskAPI ::Error ::ClientError
163163 nil
164164 end
@@ -239,8 +239,8 @@ def destroy!
239239 end
240240
241241 # Destroys, returning false on error.
242- def destroy ( &block )
243- destroy! ( &block )
242+ def destroy ( &)
243+ destroy! ( &)
244244 rescue ZendeskAPI ::Error ::ClientError
245245 false
246246 end
@@ -249,15 +249,15 @@ module ClassMethod
249249 # Deletes a resource given the id passed in.
250250 # @param [Client] client The {Client} object to be used
251251 # @param [Hash] opts The optional parameters to pass. Defaults to {}
252- def destroy! ( client , opts = { } , &block )
253- new ( client , opts ) . destroy! ( &block )
252+ def destroy! ( client , opts = { } , &)
253+ new ( client , opts ) . destroy! ( &)
254254
255255 true
256256 end
257257
258258 # Destroys, returning false on error.
259- def destroy ( client , attributes = { } , &block )
260- destroy! ( client , attributes , &block )
259+ def destroy ( client , attributes = { } , &)
260+ destroy! ( client , attributes , &)
261261 rescue ZendeskAPI ::Error ::ClientError
262262 false
263263 end
@@ -289,20 +289,20 @@ def self.included(klass)
289289
290290 module ClassMethod
291291 # Updates, returning false on error.
292- def update ( client , attributes = { } , &block )
293- update! ( client , attributes , &block )
292+ def update ( client , attributes = { } , &)
293+ update! ( client , attributes , &)
294294 rescue ZendeskAPI ::Error ::ClientError
295295 false
296296 end
297297
298298 # Updates a resource given the id passed in.
299299 # @param [Client] client The {Client} object to be used
300300 # @param [Hash] attributes The attributes to update. Default to {
301- def update! ( client , attributes = { } , &block )
301+ def update! ( client , attributes = { } , &)
302302 ZendeskAPI ::Client . check_deprecated_namespace_usage attributes , singular_resource_name
303303 resource = new ( client , :id => attributes . delete ( :id ) , :global => attributes . delete ( :global ) , :association => attributes . delete ( :association ) )
304304 resource . attributes . merge! ( attributes )
305- resource . save! ( :force_update => resource . is_a? ( SingularResource ) , &block )
305+ resource . save! ( :force_update => resource . is_a? ( SingularResource ) , &)
306306 resource
307307 end
308308 end
0 commit comments