Module: Credly::Requierable
Instance Method Summary collapse
Instance Method Details
#require_at_least_one_file(options, *args) ⇒ Object
9 10 11 12 13 |
# File 'lib/credly/requierable.rb', line 9 def require_at_least_one_file(, *args) args.each do |argument| raise ArgumentError.new('There should be at least one file') if [argument].empty? end end |
#require_present(options, *args) ⇒ Object
3 4 5 6 7 |
# File 'lib/credly/requierable.rb', line 3 def require_present(, *args) args.each do |argument| raise ArgumentError.new("Argument #{argument} is required") if [argument].nil? end end |