Sha256: 0862e43056cdb7afa4adbcbcc7c71b400c2362a7f0ff2d9ee49679930ff57d49
Contents?: true
Size: 625 Bytes
Versions: 1
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true module Leftovers module ValueProcessors class EachKeywordArgument def initialize(then_processor) @then_processor = then_processor freeze end def process(_str, node, method_node) kwargs = node.kwargs return unless kwargs Leftovers.map_or_self(kwargs.children) do |pair| next unless pair.type == :pair argument_node = pair.second str = argument_node.to_s if argument_node.string_or_symbol? @then_processor.process(str, argument_node, method_node) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
leftovers-0.8.0 | lib/leftovers/value_processors/each_keyword_argument.rb |