Module: Ramcrest

Defined in:
lib/ramcrest.rb,
lib/ramcrest/is.rb,
lib/ramcrest/aint.rb,
lib/ramcrest/matcher.rb,
lib/ramcrest/anything.rb,
lib/ramcrest/equal_to.rb,
lib/ramcrest/has_size.rb,
lib/ramcrest/includes.rb,
lib/ramcrest/assertion.rb,
lib/ramcrest/such_that.rb,
lib/ramcrest/comparable.rb,
lib/ramcrest/has_attribute.rb,
lib/ramcrest/matcher_matcher.rb,
lib/ramcrest/includes_exactly.rb,
lib/ramcrest/base_enumerable_matcher.rb,
lib/ramcrest/includes_in_any_order_exactly.rb

Defined Under Namespace

Modules: Aint, Anything, Assertion, Comparable, Enumerable, EqualTo, HasAttribute, HasSize, Includes, IncludesExactly, IncludesInAnyOrderExactly, Is, Matcher, MatcherMatcher, SuchThat

Class Method Summary collapse

Class Method Details

.is_matcher?(possible_matcher) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/ramcrest.rb', line 17

def self.is_matcher?(possible_matcher)
  possible_matcher.respond_to?(:matches?) && possible_matcher.respond_to?(:description)
end