class Grape::Validations::ParamsScope::Attr
def self.attr_key(declared_param_attr)
def self.attr_key(declared_param_attr) return attr_key(declared_param_attr.key) if declared_param_attr.is_a?(self) if declared_param_attr.is_a?(Hash) declared_param_attr.transform_values { |value| attrs_keys(value) } else declared_param_attr end end
def self.attrs_keys(declared_params)
def self.attrs_keys(declared_params) declared_params.map do |declared_param_attr| attr_key(declared_param_attr) end end
def initialize(key, scope)
-
scope(Grape::Validations::ParamsScope) -- scope of attr -
key(Hash, Symbol) -- key of attr
def initialize(key, scope) @key = key @scope = scope end