Sha256: 102e48935d3f71d71e113a6faaa3a5a3365949adb2d7ce002c69d7e406d142de
Contents?: true
Size: 882 Bytes
Versions: 24
Compression:
Stored size: 882 Bytes
Contents
# frozen_string_literal: true module Unparser class Emitter # Arguments emitter class Args < self def emit_block_arguments delimited(normal_arguments) write(',') if normal_arguments.one? && n_arg?(normal_arguments.first) emit_shadowargs end def emit_def_arguments delimited(normal_arguments) end def emit_lambda_arguments delimited(normal_arguments) emit_shadowargs end private def emit_shadowargs return if shadowargs.empty? write('; ') delimited(shadowargs) end def normal_arguments children.reject(&method(:n_shadowarg?)) end memoize :normal_arguments def shadowargs children.select(&method(:n_shadowarg?)) end memoize :shadowargs end # Arguments end # Emitter end # Unparser
Version data entries
24 entries across 24 versions & 2 rubygems