class Steep::Interface::Params
def extract_keywords(args)
def extract_keywords(args) last_arg = args.last keywords = {} rest = [] if last_arg&.type == :hash last_arg.children.each do |element| case element.type when :pair if element.children[0].type == :sym name = element.children[0].children[0] keywords[name] = element.children[1] end when :kwsplat rest << element.children[0] end end end [keywords, rest] end