lib/superhosting/composite_mapper/mux.rb
When using method_missing
, define respond_to_missing?
and fall back on super
. Open
Open
def method_missing(m, *args, &block)
if etc.nil?
warn('No mux available!')
else
etc.send(m, *args, &block)
- Read upRead up
- Exclude checks
This cop checks for the presence of method_missing
without also
defining respond_to_missing?
and falling back on super
.
Example:
#bad
def method_missing(name, *args)
# ...
end
#good
def respond_to_missing?(name, include_private)
# ...
end
def method_missing(name, *args)
# ...
super
end