Sha256: ca2d2fdad59140af0f77422c714e2ebd05bad9f2de00272db3c5f3968552b147

Contents?: true

Size: 154 Bytes

Versions: 3

Compression:

Stored size: 154 Bytes

Contents

class Array
    
  # Like #last but returns the last element
  # in an array.
  #
  #   [1,2,3].foot  #=> [3]
  #
  def foot
    slice(-1,1)
  end 

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.7.0 lib/facet/array/foot.rb
facets-0.7.1 lib/facet/array/foot.rb
facets-0.7.2 lib/facet/array/foot.rb