Class: Fixably::ApplicationResource

Inherits:
ActiveResource::Base show all
Extended by:
Authorization
Includes:
Actions, Encoding, LoadFromResponse
Defined in:
lib/fixably/application_resource.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Authorization

headers

Methods included from LoadFromResponse

#load

Methods included from Encoding

#encode

Methods included from Actions

#destroy, included, #save, #save!

Constructor Details

#initialize(attributes = {}, persisted = false) ⇒ ApplicationResource

rubocop:disable Style/OptionalBooleanParameter



43
44
45
46
47
# File 'lib/fixably/application_resource.rb', line 43

def initialize(attributes = {}, persisted = false) # rubocop:disable Style/OptionalBooleanParameter
  super(attributes, persisted)

  self.class.site
end

Instance Attribute Details

#parent_associationObject

Returns the value of attribute parent_association.



17
18
19
# File 'lib/fixably/application_resource.rb', line 17

def parent_association
  @parent_association
end

Class Method Details

.siteObject



20
21
22
23
# File 'lib/fixably/application_resource.rb', line 20

def site
  self.site = site_url unless _site_defined?
  super()
end