Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/bitbucket_rest_api/core_ext/array.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#except(*keys) ⇒ Object
:nodoc:.
-
#except!(*items) ⇒ Object
:nodoc:.
- #extract_options! ⇒ Object
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 last.is_a?(::Hash) ? pop : {} end |