タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

nokogiriに関するtakahashimのブックマーク (1)

  • Ruby Scraping - Nokogiriのタグ検索機能

    XML::NodeSetクラスのリファレンスです。 mapとかfindとかfind_allなど、Enumerableモジュールのメソッドは全て使えます。 まあNodeクラスの配列みたいなもんだと思えばいい。 NodeSetクラスはNodeクラスとの継承関係はありません。 中身の要素を取得したい empty?() Is this NodeSet empty? each() {|self[x]| ...} Iterate over each node, yielding to block first() Get the first element of the NodeSet. last() Get the last element of the NodeSet. size() document このNodeSetが含まれているDocumentを返す。 再検索 /(*paths)

  • 1