Module: WrAPI::RespondTo
- Included in:
- WrAPI
- Defined in:
- lib/wrapi/respond_to.rb
Overview
Module to delegate methods to the Client
Class Method Summary collapse
-
.method_missing(method, *args, &block) ⇒ Object
Delegate method calls to the Client.
-
.respond_to?(method, include_all = false) ⇒ Boolean
Checks if the Client responds to a method.
Class Method Details
.method_missing(method, *args, &block) ⇒ Object
Delegate method calls to the Client
11 12 13 14 15 |
# File 'lib/wrapi/respond_to.rb', line 11 def self.method_missing(method, *args, &block) return super unless client.respond_to?(method) client.send(method, *args, &block) end |
.respond_to?(method, include_all = false) ⇒ Boolean
Checks if the Client responds to a method
22 23 24 |
# File 'lib/wrapi/respond_to.rb', line 22 def self.respond_to?(method, include_all = false) client.respond_to?(method, include_all) || super end |