Module: Stendhal::Matchers
- Included in:
- Example
- Defined in:
- lib/stendhal/matchers.rb,
lib/stendhal/matchers/kind.rb,
lib/stendhal/matchers/equality.rb,
lib/stendhal/matchers/predicate.rb,
lib/stendhal/matchers/abstract_matcher.rb
Defined Under Namespace
Classes: AbstractMatcher, Equality, Kind, Predicate
Instance Method Summary collapse
- #be_a(kind) ⇒ Object (also: #be_kind_of, #be_a_kind_of)
- #eq(other) ⇒ Object (also: #eql)
- #method_missing(m, *args) ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/stendhal/matchers.rb', line 19 def method_missing(m,*args) if m.to_s =~ /be_(\w+)/ Predicate.new(($1 + '?').to_sym) else super(m,*args) end end |