Module: Sinatra::RequireParam

Defined in:
lib/logstash/web/helpers/require_param.rb

Instance Method Summary collapse

Instance Method Details

#require_param(*fields) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/logstash/web/helpers/require_param.rb', line 5

def require_param(*fields)
  missing = []
  fields.each do |field|
    if params[field].nil?
      missing << field
    end
  end
  return missing
end