Sha256: ed0ffb4b0917a6cde048eb381de233b94cb6e8f21fc6f679f1434304e8878071

Contents?: true

Size: 673 Bytes

Versions: 7

Compression:

Stored size: 673 Bytes

Contents

# encoding: utf-8

module Github
  module Validations
    module Presence

      # Ensures that esential arguments are present before request is made
      #
      def _validate_presence_of(*params)
        params.each do |param|
          raise ArgumentError, "parameter cannot be nil" if param.nil?
        end
      end


      # Check if user or repository parameters are passed
      #
      def _validate_user_repo_params(user_name, repo_name)
        raise ArgumentError, "[user] parameter cannot be nil" if user_name.nil?
        raise ArgumentError, "[repo] parameter cannot be nil" if repo_name.nil?
      end

    end # Presence
  end # Validations
end # Github

Version data entries

7 entries across 7 versions & 1 rubygems

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