Module: HyperResource::Modules::Deprecations

Included in:
HyperResource
Defined in:
lib/hyper_resource/modules/deprecations.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



5
6
7
# File 'lib/hyper_resource/modules/deprecations.rb', line 5

def self.included(klass)
  klass.extend(ClassMethods)
end

Instance Method Details

#_hr_deprecate(*args) ⇒ Object

Show a deprecation message.



11
12
13
# File 'lib/hyper_resource/modules/deprecations.rb', line 11

def _hr_deprecate(*args)
  self.class._hr_deprecate(*args)
end

#deserialized_responseObject



43
44
45
46
47
# File 'lib/hyper_resource/modules/deprecations.rb', line 43

def deserialized_response
  _hr_deprecate('HyperResource#deserialized_response is deprecated. '+
                'Please use HyperResource#body instead.')
  body
end

#response_bodyObject

response_body, response_object, and deserialized_response

are deprecated in favor of +body+.  (Sorry. Naming things is hard.)

Deprecated at 0.2. @private



29
30
31
32
33
# File 'lib/hyper_resource/modules/deprecations.rb', line 29

def response_body
  _hr_deprecate('HyperResource#response_body is deprecated. '+
                'Please use HyperResource#body instead.')
  body
end

#response_objectObject



36
37
38
39
40
# File 'lib/hyper_resource/modules/deprecations.rb', line 36

def response_object
  _hr_deprecate('HyperResource#response_object is deprecated. '+
                'Please use HyperResource#body instead.')
  body
end