Module: L43Peg::Mappers
- Included in:
- Combinators, Parsers::IntParser
- Defined in:
- lib/l43_peg/mappers.rb
Instance Method Summary collapse
Instance Method Details
#join_and_to_i ⇒ Object
6 7 8 9 10 |
# File 'lib/l43_peg/mappers.rb', line 6 def join_and_to_i -> list do list.join.to_i end end |
#join_maps ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/l43_peg/mappers.rb', line 12 def join_maps -> maps do maps.reduce Hash.new do |map, entry| map.merge(entry) { |*args| args.drop(1).flatten } end end end |