Sha256: 6a5fb8c84b23bc8f5a39880f4c8e69971182a88b588f6408841f9df3ed83db96
Contents?: true
Size: 237 Bytes
Versions: 4
Compression:
Stored size: 237 Bytes
Contents
module Dry module Logic class Rule::Each < Rule::Value def apply(input) Hash[input.map.with_index { |element, index| [index, predicate.(element)] }] end def type :each end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dry-logic-0.3.0 | lib/dry/logic/rule/each.rb |
dry-logic-0.2.3 | lib/dry/logic/rule/each.rb |
dry-logic-0.2.2 | lib/dry/logic/rule/each.rb |
dry-logic-0.2.1 | lib/dry/logic/rule/each.rb |