Class: Remarkable::Base
- Inherits:
-
Object
- Object
- Remarkable::Base
- Extended by:
- DSL
- Includes:
- Messages
- Defined in:
- lib/remarkable/base.rb
Overview
This class holds the basic structure for Remarkable matchers. All matchers must inherit from it.
Constant Summary
Constants included from DSL
Instance Method Summary collapse
- #negative? ⇒ Boolean
- #positive? ⇒ Boolean
-
#spec(binding) ⇒ Object
Optional to provide spec binding to matchers.
Methods included from DSL
Methods included from Messages
#description, #failure_message_for_should, #failure_message_for_should_not
Instance Method Details
#negative? ⇒ Boolean
18 19 20 |
# File 'lib/remarkable/base.rb', line 18 def negative? false end |
#positive? ⇒ Boolean
14 15 16 |
# File 'lib/remarkable/base.rb', line 14 def positive? !negative? end |
#spec(binding) ⇒ Object
Optional to provide spec binding to matchers.
9 10 11 12 |
# File 'lib/remarkable/base.rb', line 9 def spec(binding) @spec = binding self end |