Class: Axel::ServiceResource::Base

Inherits:
Typhoid::Resource
  • Object
show all
Extended by:
CascadableAttribute
Includes:
Associations, Attributes, AutomaticResource, Inspects, Queries, Requesters, Routes, TyphoidExtensions
Defined in:
app/models/axel/service_resource/base.rb

Direct Known Subclasses

ApiProxy

Instance Method Summary collapse

Methods included from CascadableAttribute

_cascadable_attributes, _cascadable_attributes=, _instance_var_for, cascade_attribute, inherited

Methods included from Attributes

#assign_attributes, #update_attributes

Methods included from Requesters

#default_request_options

Methods included from TyphoidExtensions

#after_build, #attributes, #build_typhoid_request, #create_request, #default_request_options, #delete_request, #envelope?, #load_values, #merge_result, #object_request, #request_and_load, #resource_exception, #update_request

Methods included from Inspects

#inspect

Constructor Details

#initialize(params = {}) ⇒ Base

Returns a new instance of Base.


23
24
25
# File 'app/models/axel/service_resource/base.rb', line 23

def initialize(params = {})
  super (params || {}).with_indifferent_access
end

Instance Method Details

#reloadObject


34
35
36
37
38
39
# File 'app/models/axel/service_resource/base.rb', line 34

def reload
  reset_association_cache!
  request_and_load do
    self.class.manual_request :get, reload_uri, reload_params
  end
end