lib/grape/validations/validators/base.rb in grape-0.13.0 vs lib/grape/validations/validators/base.rb in grape-0.14.0

- old
+ new

@@ -1,9 +1,16 @@ module Grape module Validations class Base attr_reader :attrs + # Creates a new Validator from options specified + # by a +requires+ or +optional+ directive during + # parameter definition. + # @param attrs [Array] names of attributes to which the Validator applies + # @param options [Object] implementation-dependent Validator options + # @param required [Boolean] attribute(s) are required or optional + # @param scope [ParamsScope] parent scope for this Validator def initialize(attrs, options, required, scope) @attrs = Array(attrs) @option = options @required = required @scope = scope