Module: RealPush::API::BaseUpdate
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/realpush/api/base_update.rb
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/realpush/api/base_update.rb', line 6 def self.included(base) base.class_eval do def update(id, data) valid_params? data content = execute :patch, url("#{self.class.params[:base_path]}/#{id}.json"), {}, data parse_content content rescue RealPush::HTTPError, RealPush::ConfigurationError => e raise RealPush::ConfigurationError, e. end end end |