Module: Trith::Core::Textual::Predicates
- Defined in:
- lib/trith/core/textual.rb
Overview
Textual predicates.
Instance Method Summary (collapse)
- - (Boolean) chrp(obj) (also: #chr?)
- - (Boolean) textp(obj) (also: #text?)
Instance Method Details
- (Boolean) chrp(obj) Also known as: chr?
13 14 15 16 17 18 |
# File 'lib/trith/core/textual.rb', line 13 def chrp(obj) case obj when String then obj.size == 1 else false end end |
- (Boolean) textp(obj) Also known as: text?
24 25 26 27 28 29 |
# File 'lib/trith/core/textual.rb', line 24 def textp(obj) case obj when String then true else false end end |