Class: Zermelo::ConnectionProxy
- Inherits:
-
Object
- Object
- Zermelo::ConnectionProxy
- Defined in:
- lib/zermelo.rb
Instance Method Summary collapse
-
#exec ⇒ Object
need to override Kernel.exec.
-
#initialize(connection) ⇒ ConnectionProxy
constructor
A new instance of ConnectionProxy.
- #method_missing(name, *args, &block) ⇒ Object
- #respond_to?(name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(connection) ⇒ ConnectionProxy
Returns a new instance of ConnectionProxy.
79 80 81 |
# File 'lib/zermelo.rb', line 79 def initialize(connection) @proxied_connection = connection end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/zermelo.rb', line 92 def method_missing(name, *args, &block) unless Zermelo.logger.nil? Zermelo.logger.debug { debug_str = "#{name}" debug_str += " #{args.inspect}" unless args.empty? debug_str } end result = @proxied_connection.send(name, *args, &block) unless Zermelo.logger.nil? Zermelo.logger.debug { debug_str = "#{name}" debug_str += " result: #{result}" debug_str } end result end |
Instance Method Details
#exec ⇒ Object
need to override Kernel.exec
84 85 86 |
# File 'lib/zermelo.rb', line 84 def exec @proxied_connection.exec end |
#respond_to?(name, include_private = false) ⇒ Boolean
88 89 90 |
# File 'lib/zermelo.rb', line 88 def respond_to?(name, include_private = false) @proxied_connection.respond_to?(name, include_private) end |