Class: NominetEPP::BasicResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/nominet-epp/responses/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ BasicResponse

Returns a new instance of BasicResponse.



3
4
5
# File 'lib/nominet-epp/responses/response.rb', line 3

def initialize(response)
  @response = response
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



9
10
11
12
# File 'lib/nominet-epp/responses/response.rb', line 9

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

Instance Method Details

#method(sym) ⇒ Object



22
23
24
# File 'lib/nominet-epp/responses/response.rb', line 22

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

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

Returns:

  • (Boolean)


19
20
21
# File 'lib/nominet-epp/responses/response.rb', line 19

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

#respond_to_missing?(method, include_private) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/nominet-epp/responses/response.rb', line 14

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