Class: Woopy::Resource

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/woopy/resource.rb

Direct Known Subclasses

Account, Employment, Ownership, Role, User

Class Method Summary collapse

Class Method Details

.headersObject

If headers are not defined in a given subclass, then obtain headers from the superclass. Taken from the Harvest gem: github.com/aiaio/harvest



9
10
11
12
13
14
15
16
17
# File 'lib/woopy/resource.rb', line 9

def headers
  if defined?(@headers)
    @headers
  elsif superclass != Object && superclass.headers
    superclass.headers
  else
    @headers ||= {}
  end
end