Class: Inspector::Constraints::True

Inherits:
Object
  • Object
show all
Includes:
Inspector::Constraint
Defined in:
lib/inspector/constraints/true.rb

Instance Method Summary collapse

Methods included from Inspector::Constraint

#negate!, #positive?, #validator

Instance Method Details

#inspectObject



14
15
16
# File 'lib/inspector/constraints/true.rb', line 14

def inspect
  "#<true>"
end

#to_sObject



10
11
12
# File 'lib/inspector/constraints/true.rb', line 10

def to_s
  "be_true"
end

#valid?(actual) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/inspector/constraints/true.rb', line 6

def valid?(actual)
  !!actual
end