class EPUB::Searcher::XHTML
Constants
- ALGORITHMS
Public Class Methods
new(element)
click to toggle source
@param word [String]
# File lib/epub/searcher/xhtml.rb, line 21 def initialize(element) @element = element end
search_text(element, word)
click to toggle source
@param element [REXML::Element, REXML::Document, Oga::XML::ELement, Oga::XML::Document, Nokogiri::XML::Element, Nokogiri::XML::Document] @param word [String] @return [Array<Result>]
# File lib/epub/searcher/xhtml.rb, line 15 def search_text(element, word) new(element.respond_to?(:root) ? element.root : element).search_text(word) end