Method: RBS::Prototype::RBI#each_arg

Defined in:
lib/rbs/prototype/rbi.rb

#each_arg(array, &block) ⇒ Object



602
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/rbs/prototype/rbi.rb', line 602

def each_arg(array, &block)
  if block_given?
    if array&.type == :ARRAY || array&.type == :LIST
      array.children.each do |arg|
        if arg
          yield arg
        end
      end
    end
  else
    enum_for :each_arg, array
  end
end