Module: Sus::BeTruthy
- Defined in:
- lib/sus/be_truthy.rb
Overview
Represents a predicate that checks if the subject is truthy.
Class Method Summary collapse
-
.call(assertions, subject) ⇒ Object
Evaluate this predicate against a subject.
-
.print(output) ⇒ Object
Print a representation of this predicate.
Class Method Details
.call(assertions, subject) ⇒ Object
Evaluate this predicate against a subject.
18 19 20 21 22 |
# File 'lib/sus/be_truthy.rb', line 18 def self.call(assertions, subject) assertions.nested(self) do |assertions| assertions.assert(subject, self) end end |
.print(output) ⇒ Object
Print a representation of this predicate.
11 12 13 |
# File 'lib/sus/be_truthy.rb', line 11 def self.print(output) output.write("be truthy") end |