Module: WildcardMatchers::Helpers
- Included in:
- WildcardMatchers
- Defined in:
- lib/wildcard_matchers/helpers.rb,
lib/wildcard_matchers/helpers/all_of.rb,
lib/wildcard_matchers/helpers/any_of.rb,
lib/wildcard_matchers/helpers/nil_or.rb,
lib/wildcard_matchers/helpers/for_all.rb,
lib/wildcard_matchers/helpers/for_any.rb,
lib/wildcard_matchers/helpers/responding.rb
Defined Under Namespace
Classes: AllOf, AnyOf, ForAll, ForAny, NilOr, Responding
Class Method Summary collapse
Class Method Details
.define_wildcard_helper(name) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/wildcard_matchers/helpers.rb', line 4 def define_wildcard_helper(name) define_method(name) do |expectation = nil, &block| expectation = block_given? ? block : expectation ::WildcardMatchers::Helpers.const_get(name.to_s.camelcase(:upper)).new(expectation) end end |