module Rooibos::Message::Predicates
Fallback predicate mixin.
Returns false for any unknown predicate method (ending in +?+). Include in custom message types for safe predicate calls.
Public Instance Methods
Source
# File lib/rooibos/message.rb, line 20 def method_missing(name, *args, **kwargs, &block) return false if name.to_s.end_with?("?") && args.empty? && kwargs.empty? super end
Returns false for unknown predicate methods.
Calls superclass method
Source
# File lib/rooibos/message.rb, line 27 def respond_to_missing?(name, *) name.to_s.end_with?("?") end
Responds to all predicate methods.