Class: Mal::LengthT
Direct Known Subclasses
Instance Method Summary collapse
- #===(value) ⇒ Object
-
#initialize(desired_length) ⇒ LengthT
constructor
A new instance of LengthT.
- #inspect ⇒ Object
Methods inherited from OnlyT
Constructor Details
#initialize(desired_length) ⇒ LengthT
Returns a new instance of LengthT.
188 189 190 |
# File 'lib/mal.rb', line 188 def initialize(desired_length) @desired_length = length end |
Instance Method Details
#===(value) ⇒ Object
192 193 194 195 |
# File 'lib/mal.rb', line 192 def ===(value) return false unless value.respond_to? :length @desired_length == value.length end |
#inspect ⇒ Object
197 |
# File 'lib/mal.rb', line 197 def inspect; 'OfElements(%d)' % @desired_length; end |