diff options
Diffstat (limited to 'src/or_specification.coffee')
| -rw-r--r-- | src/or_specification.coffee | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or_specification.coffee b/src/or_specification.coffee new file mode 100644 index 0000000..6fd7172 --- /dev/null +++ b/src/or_specification.coffee @@ -0,0 +1,12 @@ +Module = require('./module') +Specification = require('./specification') + +module.exports = class OrSpecification extends Module + @include Specification + + constructor: (left, right) -> + @left = left + @right = right + + matches: (item) -> + @left.matches(item) || @right.matches(item) |
