Sha256: 166a7c24c6b430a58c85b4c15a7b866b73d455a9b90d14a8f628c591b67fe39c

Contents?: true

Size: 366 Bytes

Versions: 1

Compression:

Stored size: 366 Bytes

Contents

class Array
  # Alias for shift.
  #
  #   require 'facet/array/pull'
  #
  #   a=[1,2,3]
  #   a.pull      #=> 1
  #   a           #=> [2,3]
  # 
  alias_method( :pull, :shift )
  
  # Alias for unshift.
  #
  #   require 'facet/array/pull'
  #
  #   a=[1,2,3]
  #   a.put(9)   #=> [9,1,2,3]
  #   a          #=> [9,1,2,3]
  # 
  alias_method( :put, :unshift )
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-0.6.3 lib/facet/array/pull.rb