Class: EPUB::Searcher::XHTML
- Inherits:
-
Object
- Object
- EPUB::Searcher::XHTML
- Defined in:
- lib/epub/searcher/xhtml.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Restricted, Seamless
Constant Summary collapse
- ALGORITHMS =
{}
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(element) ⇒ XHTML
constructor
A new instance of XHTML.
Constructor Details
#initialize(element) ⇒ XHTML
Returns a new instance of XHTML.
21 22 23 |
# File 'lib/epub/searcher/xhtml.rb', line 21 def initialize(element) @element = element end |
Class Method Details
.search_text(element, word) ⇒ Array<Result>
15 16 17 |
# 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 |