Sha256: c60de5c02de00e3ea22fadd0bf93b32b312e2d946782174087b2923b70f480d7
Contents?: true
Size: 538 Bytes
Versions: 31
Compression:
Stored size: 538 Bytes
Contents
class Rack::App::Middlewares::Params::Definition require 'rack/app/middlewares/params/definition/options' def initialize(&descriptor) @required = {} @optional = {} instance_exec(&descriptor) end def required(params_key, options) @required[params_key.to_s] = self.class::Options.new(options).formatted end def optional(params_key, options) @optional[params_key.to_s] = self.class::Options.new(options).formatted end def to_descriptor { :required => @required, :optional => @optional } end end
Version data entries
31 entries across 31 versions & 2 rubygems