Sha256: 05b5bc9f26d8b1c6f6f945378545058ba852145e6412256ffdf258ad325fbd67

Contents?: true

Size: 481 Bytes

Versions: 6

Compression:

Stored size: 481 Bytes

Contents

# encoding: utf-8

module Github
  module Validations
    module Required

      # Ensures that esential input parameters are present before request is made.
      #
      def _validate_inputs(required, provided)
        result = required.all? do |key|
          provided.has_deep_key? key
        end
        if !result
          raise Github::Error::RequiredParams.new(provided, required)
        end
        result
      end

    end # Required
  end # Validations
end # Github

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
github_api-0.5.4 lib/github_api/validations/required.rb
github_api-0.5.3 lib/github_api/validations/required.rb
github_api-0.5.2 lib/github_api/validations/required.rb
github_api-0.5.1 lib/github_api/validations/required.rb
github_api-0.5.0 lib/github_api/validations/required.rb
github_api-0.5.0.rc1 lib/github_api/validations/required.rb