Module: Excon::HyperMedia::Ext::Response

Included in:
Response
Defined in:
lib/excon/hypermedia/ext/response.rb

Overview

Ext::Response

Overloads the default Excon::Response to add a thin HyperMedia layer on top.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *params) ⇒ Object



12
13
14
# File 'lib/excon/hypermedia/ext/response.rb', line 12

def method_missing(method_name, *params)
  hypermedia_response.handle(method_name, *params) || super
end

Instance Method Details

#hypermedia_responseObject



20
21
22
# File 'lib/excon/hypermedia/ext/response.rb', line 20

def hypermedia_response
  @hypermedia_response ||= HyperMedia::Response.new(self)
end

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/excon/hypermedia/ext/response.rb', line 16

def respond_to_missing?(method_name, include_private = false)
  hypermedia_response.handle(method_name, *params) != false || super
end