Sha256: c822d356ea741c0e1eae457a87f72eb1a5fc0a50972572464d1afcdb5ab737cf
Contents?: true
Size: 533 Bytes
Versions: 33
Compression:
Stored size: 533 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
33 entries across 33 versions & 1 rubygems