Catching up after the holidays.
[kakapo:kakapo.git] / src / Matchers / Matcher.nqp
1 # Copyright (C) 2009, Austin Hastings. See accompanying LICENSE file, or 
2 # http://www.opensource.org/licenses/artistic-license-2.0.php for license.
3
4 class Matcher;
5
6 INIT {
7         Program::initload(:done(1));
8 }
9
10 method describe_failure($item, $description) {
11         return $description ~ "was '$item'";
12 }
13
14 method describe_self($description)      { self._ABSTRACT_METHOD; }
15
16 method init(@args, %opts) {
17         Class::BaseBehavior::init(self, @args, %opts);
18 }
19
20 method matches($item)                   { self._ABSTRACT_METHOD; }