Sha256: 6aee854711346d556e7100d3fb887d536247e1379373418b93d61f078a7e4f6b
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
o A constrain_class method that allows for inherited-from tests o Allow single-argument boolean expressions: 'constrain !a.empty?' o This seems to cause a stack error: 'constrain some-hash, Symbol' o Allow range as value expressions. And REs! o Use | to create class-or expressions o Class | Class syntax o Will solve problem with [String, Integer] as a String/Integer vs. An array of strings and integers o Use & to construct tuple expressions o Class & Class (doesn't look good - maybe Class + Class ?) o Alt: A tuple method: "Symbol => constrain.tuple(String, Integer)" o Better error message for 'constrain EXPR' o Explain that 'constrain EXPR' can be used for 'constrain SomeClass < AnotherClass' o Match ranges and regular expressions o An array and hash method: "Symbol => constrain.array(Integer), String => constrain.hash(Symbol, Integer)" Nope. Solved by | syntax o Constrained attributes: constrain_reader, constrain_writer, constrain_accessor: o Messages should include info about the unexpected element type in arrays (and maybe more): "Expected [#<PgGraph::Data::Record:public.pings[1] {id: 1, name: 'Ping A'}>, #<PgGraph::Data::Record:public.pings[2] {id: 2, name: 'Ping B'}>, nil] to match [PgGraph::Data::Record] + constrain value, class-expr, "Error message" + Check against values: 'constrain arg, :one_value, :another_value, 1, 2, 3' + Allow 'constrain EXRP'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
constrain-0.10.0 | TODO |