Class: HTML5::TreeWalkers::Base
- Inherits:
-
Object
- Object
- HTML5::TreeWalkers::Base
- Includes:
- TokenConstructor
- Defined in:
- lib/feed_tools/vendor/html5/lib/html5/treewalkers/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #each ⇒ Object (also: #walk)
-
#initialize(tree) ⇒ Base
constructor
A new instance of Base.
- #to_ary ⇒ Object
Methods included from TokenConstructor
#_, #comment, #doctype, #empty_tag, #end_tag, #error, #normalize_attrs, #start_tag, #text, #unknown
Constructor Details
#initialize(tree) ⇒ Base
Returns a new instance of Base.
62 63 64 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treewalkers/base.rb', line 62 def initialize(tree) @tree = tree end |
Instance Method Details
#each ⇒ Object Also known as: walk
66 67 68 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treewalkers/base.rb', line 66 def each raise NotImplementedError end |
#to_ary ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/feed_tools/vendor/html5/lib/html5/treewalkers/base.rb', line 72 def to_ary a = [] each do |i| a << i end a end |