Class: TreeHaver::Backends::Commonmarker::Tree
- Inherits:
-
Object
- Object
- TreeHaver::Backends::Commonmarker::Tree
- Defined in:
- lib/tree_haver/backends/commonmarker.rb
Overview
Commonmarker tree wrapper
Instance Attribute Summary collapse
-
#inner_tree ⇒ Object
readonly
Returns the value of attribute inner_tree.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #comments ⇒ Object
- #errors ⇒ Object
-
#initialize(document, source) ⇒ Tree
constructor
A new instance of Tree.
- #inspect ⇒ Object
- #root_node ⇒ Object
- #warnings ⇒ Object
Constructor Details
#initialize(document, source) ⇒ Tree
Returns a new instance of Tree.
149 150 151 152 153 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 149 def initialize(document, source) @inner_tree = document @source = source @lines = source.lines end |
Instance Attribute Details
#inner_tree ⇒ Object (readonly)
Returns the value of attribute inner_tree.
147 148 149 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 147 def inner_tree @inner_tree end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
147 148 149 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 147 def source @source end |
Instance Method Details
#comments ⇒ Object
167 168 169 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 167 def comments [] end |
#errors ⇒ Object
159 160 161 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 159 def errors [] end |
#inspect ⇒ Object
171 172 173 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 171 def inspect "#<TreeHaver::Backends::Commonmarker::Tree>" end |
#root_node ⇒ Object
155 156 157 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 155 def root_node Node.new(@inner_tree, @source, @lines) end |
#warnings ⇒ Object
163 164 165 |
# File 'lib/tree_haver/backends/commonmarker.rb', line 163 def warnings [] end |