Sha256: cb93e599db6e59b6666381969348d2c57a196aeff84d3e580ec08a029308f81c

Contents?: true

Size: 521 Bytes

Versions: 24

Compression:

Stored size: 521 Bytes

Contents

# encoding: utf-8

class Array # :nodoc:

  # Returns a new arrray with keys removed
  #
  def except(*keys)
    self.dup.except!(*keys)
  end unless method_defined? :except

  # Similar to except but modifies self
  #
  def except!(*items)
    copy = self.dup
    copy.reject! { |item| items.include? item }
    copy
  end unless method_defined? :except!

  # Selects a hash from the arguments list
  #
  def extract_options!
    last.is_a?(::Hash) ? pop : {}
  end unless method_defined? :extract_options!

end # Array

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
github_api2-1.0.1 lib/github_api2/core_ext/array.rb
github_api2-1.0.0 lib/github_api2/core_ext/array.rb
github_api-0.19.0 lib/github_api/core_ext/array.rb
lingfennan-github_api-0.18.2 lib/github_api/core_ext/array.rb
github_api-0.18.2 lib/github_api/core_ext/array.rb
github_api-0.18.1 lib/github_api/core_ext/array.rb
github_api-0.17.0 lib/github_api/core_ext/array.rb
github_api-0.16.0 lib/github_api/core_ext/array.rb
github_api-0.15.0 lib/github_api/core_ext/array.rb
github_api-0.14.5 lib/github_api/core_ext/array.rb
github_api-0.14.4 lib/github_api/core_ext/array.rb
github_api-0.14.3 lib/github_api/core_ext/array.rb
github_api-0.14.2 lib/github_api/core_ext/array.rb
github_api-0.14.1 lib/github_api/core_ext/array.rb
github_api-0.14.0 lib/github_api/core_ext/array.rb
github_api-0.13.1 lib/github_api/core_ext/array.rb
github_api-0.13.0 lib/github_api/core_ext/array.rb
github_api-0.12.4 lib/github_api/core_ext/array.rb
github_api-0.12.3 lib/github_api/core_ext/array.rb
github_api-0.12.2 lib/github_api/core_ext/array.rb