Sha256: 0f2fd386d2a3abf8e2a50c65e193eb1cc66449fbaab4615f60c99dea5c5dcf52

Contents?: true

Size: 345 Bytes

Versions: 63

Compression:

Stored size: 345 Bytes

Contents

class Array # :nodoc:

  def except(*keys) # :nodoc:
    self.dup.except!(*keys)
  end unless method_defined?(:except)

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

  def extract_options!
    last.is_a?(::Hash) ? pop : {}
  end

end # Array

Version data entries

63 entries across 63 versions & 4 rubygems

Version Path
github_api-0.6.1 lib/github_api/core_ext/array.rb
github_api-0.6.0 lib/github_api/core_ext/array.rb
github_api-0.5.4 lib/github_api/core_ext/array.rb