Gem Hpricot.scan (input, opts) 以后再执行到哪去了

tablecell · 2016年01月02日 · 最后由 luikore 回复于 2016年02月12日 · 1771 次阅读

从\gems\hpricot-0.8.6\lib\hpricot\parse.rb line 3

def Hpricot(input = nil, opts = {}, &blk)
  Hpricot.make(input, opts, &blk)
end

\gems\hpricot-0.8.6\lib\hpricot\parse.rb line 27

def Hpricot.make(input = nil, opts = {}, &blk)
  if blk
    doc = Hpricot.build(&blk)
    doc.instance_variable_set("@options", opts)
    doc
  else
    Hpricot.scan(input, opts)
  end
end

到 Hpricot.scan(input, opts) 以后,然后执行了哪去了?找不到 scan 方法的实现 全封装在 hpricot_scan.so 里面

需要 登录 后方可回复, 如果你还没有账号请 注册新账号