Module: Corefines::Array::Third
- Defined in:
- lib/corefines/array.rb
Instance Method Summary collapse
-
#third ⇒ Object
The third element, or
nilif doesn't exist.
Instance Method Details
#third ⇒ Object
Returns the third element, or nil if doesn't exist.
20 21 22 23 24 25 26 |
# File 'lib/corefines/array.rb', line 20 module Third refine ::Array do def third self[2] end end end |