Class: Mal::MaxLengthT
Instance Method Summary collapse
Methods inherited from LengthT
Methods inherited from OnlyT
#&, #initialize, #|
Constructor Details
This class inherits a constructor from Mal::LengthT
Instance Method Details
#===(value) ⇒ Object
209 210 211 212 |
# File 'lib/mal.rb', line 209 def ===(value) return false unless value.respond_to? :length @desired_length <= value.length end |
#inspect ⇒ Object
213 |
# File 'lib/mal.rb', line 213 def inspect; 'OfAtMostElements(%d)' % @desired_length; end |