Sha256: aaef6b66b17816d73c2b06b8f9aaf2822027729b86fefab4b38af579dccb2e9a
Contents?: true
Size: 481 Bytes
Versions: 7
Compression:
Stored size: 481 Bytes
Contents
class ArgsLoader def reset! @sexp = nil end def load(method_call) reset! load_method_add_arg(Ripper.sexp(method_call)) return @sexp end private def load_method_add_arg(method_sexp) method_sexp.each do |s| next unless s.kind_of?(Array) s.each do |a| next unless a.kind_of?(Array) if a.first == :args_add_block @sexp ||= a else load_method_add_arg(s) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems