Module: Evvnt::InstanceTemplateMethods

Defined in:
lib/evvnt/instance_template_methods.rb

Overview

Internal: Template methods to provide default behaviour for API actions.

These are defined on Evvnt::Base subclasses where required to map the Evvnt API actions.

Instance Method Summary collapse

Instance Method Details

#update(**new_attributes) ⇒ Object

Template method for updating a given record

record_id - An Integer or String representing the record ID on the API. params - A Hash of params to send to the API.

Returns Base subclass



13
14
15
# File 'lib/evvnt/instance_template_methods.rb', line 13

def update(**new_attributes)
  self.class.update(id, new_attributes) unless new_attributes == attributes
end