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

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