Class: Yargi::TruePredicate

Inherits:
Predicate show all
Defined in:
lib/yargi/predicate.rb

Overview

Decorates true as a predicate

Constant Summary

Constants inherited from Predicate

Predicate::ALL, Predicate::NONE

Instance Method Summary collapse

Methods inherited from Predicate

#&, #not, to_predicate, #|

Instance Method Details

#===(elm) ⇒ Object

Always returns true



67
68
69
# File 'lib/yargi/predicate.rb', line 67

def ===(elm)
  true
end

#inspectObject

Returns ‘true’



72
73
74
# File 'lib/yargi/predicate.rb', line 72

def inspect
  "true"
end