A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://rubydoc.info/github/piotrmurach/github/master/Array below:

Array – Documentation for piotrmurach/github (master) – RubyDoc.info

Class: Array
Inherits:
Object show all
Defined in:
lib/github_api/core_ext/array.rb
Overview Instance Method Summary collapse Instance Method Details #except(*keys) ⇒ Object

Returns a new arrray with keys removed

7
8
9
# File 'lib/github_api/core_ext/array.rb', line 7

def except(*keys)
  self.dup.except!(*keys)
end
#except!(*items) ⇒ Object

Similar to except but modifies self

13
14
15
16
17
# File 'lib/github_api/core_ext/array.rb', line 13

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

Selects a hash from the arguments list

21
22
23
# File 'lib/github_api/core_ext/array.rb', line 21

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4