Sha256: a919f8bf228429982b7f5465a2698b5f85c316409e1c3b54e44e65b006032d21

Contents?: true

Size: 422 Bytes

Versions: 9

Compression:

Stored size: 422 Bytes

Contents

module Credly
  module Requierable
    def require_present(options, *args)
      args.each do |argument|
        raise ArgumentError.new("Argument #{argument} is required") if options[argument].nil?
      end
    end

    def require_at_least_one_file(options, *args)
      args.each do |argument|
        raise ArgumentError.new('There should be at least one file') if options[argument].empty?
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
credly-0.0.9 lib/credly/requierable.rb
credly-0.0.8 lib/credly/requierable.rb
credly-0.0.7 lib/credly/requierable.rb
credly-0.0.6 lib/credly/requierable.rb
credly-0.0.5 lib/credly/requierable.rb
credly-0.0.4 lib/credly/requierable.rb
credly-0.0.3 lib/credly/requierable.rb
credly-0.0.2 lib/credly/requierable.rb
credly-0.0.1 lib/credly/requierable.rb