instance method
third
Ruby on Rails 6.0.6
Since v3.0.20Signature
third()
Equal to self[2].
%w( a b c d e ).third # => "c"
Source
# File activesupport/lib/active_support/core_ext/array/access.rb, line 66
def third
self[2]
end
Defined in activesupport/lib/active_support/core_ext/array/access.rb line 66
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Array