Class: Concurrent::ErlangActor::EnvironmentConstants::Or

Inherits:
AbstractLogicOperationMatcher show all
Defined in:
lib-edge/concurrent/edge/erlang_actor.rb

Overview

Combines matchers into one which matches if any matches.

Examples:

Or[Symbol, String] === :v  # => true
Or[Symbol, String] === 'v' # => true
Or[Symbol, String] === 1   # => false

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Concurrent::ErlangActor::EnvironmentConstants::AbstractLogicOperationMatcher

Instance Method Details

#===(v) ⇒ true, false

Returns:

  • (true, false)


618
619
620
# File 'lib-edge/concurrent/edge/erlang_actor.rb', line 618

def ===(v)
  @matchers.any? { |m| m === v }
end