Class: Remarkable::Base

Inherits:
Object
  • Object
show all
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

DSL::ATTR_READERS

Instance Method Summary collapse

Methods included from DSL

extended, inherited

Methods included from Messages

#description, #failure_message_for_should, #failure_message_for_should_not

Instance Method Details

#negative?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/remarkable/base.rb', line 18

def negative?
  false
end

#positive?Boolean

Returns:

  • (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