A RetroSearch Logo

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

Search Query:

Showing content from http://rubydoc.info/github/piotrmurach/github/master/Github/Validations/Required below:

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

Module: Github::Validations::Required Instance Method Summary collapse Instance Method Details #assert_required_keys(*required, provided) ⇒ Object

Validate all keys present in a provided hash against required set, on mismatch raise Github::Error::RequiredParams Note that keys need to be in the same format i.e. symbols or strings, otherwise the comparison will fail.

14
15
16
17
18
# File 'lib/github_api/validations/required.rb', line 14

def assert_required_keys(*required, provided)
  required.flatten.all? { |key|
    provided.deep_key?(key.to_s)
  } || (raise Github::Error::RequiredParams.new(provided, required))
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