Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/bitbucket_rest_api/core_ext/array.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#except(*keys) ⇒ Object

:nodoc:



3
4
5
# File 'lib/bitbucket_rest_api/core_ext/array.rb', line 3

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

#except!(*items) ⇒ Object

:nodoc:



7
8
9
10
11
# File 'lib/bitbucket_rest_api/core_ext/array.rb', line 7

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

#extract_options!Object



13
14
15
# File 'lib/bitbucket_rest_api/core_ext/array.rb', line 13

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