Class/Module Index [+]

Quicksearch

Grape::DSL::Validations::ClassMethods

Public Instance Methods

document_attribute(names, opts) click to toggle source
# File lib/grape/dsl/validations.rb, line 18
def document_attribute(names, opts)
  @last_description ||= {}
  @last_description[:params] ||= {}
  Array(names).each do |name|
    @last_description[:params][name[:full_name].to_s] ||= {}
    @last_description[:params][name[:full_name].to_s].merge!(opts)
  end
end
params(&block) click to toggle source
# File lib/grape/dsl/validations.rb, line 14
def params(&block)
  Grape::Validations::ParamsScope.new(api: self, type: Hash, &block)
end
reset_validations!() click to toggle source
# File lib/grape/dsl/validations.rb, line 9
def reset_validations!
  settings.peek[:declared_params] = []
  settings.peek[:validations] = []
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.