Method: Array#third_to_last

Defined in:
activesupport/lib/active_support/core_ext/array/access.rb

#third_to_lastObject

Equal to self[-3].

%w( a b c d e ).third_to_last # => "c"


90
91
92
# File 'activesupport/lib/active_support/core_ext/array/access.rb', line 90

def third_to_last
  self[-3]
end