Module: Swagger::Swallow
- Included in:
- Redis
- Defined in:
- lib/swagger/swallow.rb
Instance Method Summary collapse
Instance Method Details
#swallow(method, return_value = nil) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/swagger/swallow.rb', line 4 def swallow(method, return_value = nil) define_method(method) do |*args| if defined?(LOGGER) LOGGER.write "Swagger::Redis swallowed #{method} with the following arguments #{args.inspect}" end return_value end end |