Class: EPP::Domain::Response

Inherits:
Object
  • Object
show all
Includes:
ResponseHelper
Defined in:
lib/epp-client/domain/response.rb

Instance Method Summary collapse

Methods included from ResponseHelper

#nodes_for_xpath, #value_for_xpath, #values_for_xpath

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



6
7
8
# File 'lib/epp-client/domain/response.rb', line 6

def initialize(response)
  @response = response
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



10
11
12
13
# File 'lib/epp-client/domain/response.rb', line 10

def method_missing(meth, *args, &block)
  return super unless @response.respond_to?(meth)
  @response.send(meth, *args, &block)
end

Instance Method Details

#method(sym) ⇒ Object



23
24
25
# File 'lib/epp-client/domain/response.rb', line 23

def method(sym)
  respond_to_missing?(sym, true) ? @response.method(sym) : super
end

#respond_to?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/epp-client/domain/response.rb', line 20

def respond_to?(method, include_private = false)
  respond_to_missing?(method, include_private) || super
end

#respond_to_missing?(method, include_private) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/epp-client/domain/response.rb', line 15

def respond_to_missing?(method, include_private)
  @response.respond_to?(method, include_private)
end