Class: NoraMark::Root
- Defined in:
- lib/nora_mark/node.rb,
lib/nora_mark/parser.kpeg.rb
Instance Attribute Summary collapse
-
#document_name ⇒ Object
Returns the value of attribute document_name.
-
#raw_content ⇒ Object
readonly
Returns the value of attribute raw_content.
Attributes inherited from Node
#attrs, #body_empty, #classes, #content, #first_child, #holders, #ids, #last_child, #line_no, #name, #next, #no_tag, #parent, #prev, #raw_text
Instance Method Summary collapse
- #assign_pageno ⇒ Object
-
#initialize(raw_content) ⇒ Root
constructor
A new instance of Root.
Methods inherited from Node
#_find_node, #_match?, #_remove_internal, #add_attr, #after, #all_nodes, #ancestors, #append_child, #before, #build_selector, #children, #children=, #children_empty?, #children_replaced, #clone, #each, #find_node, #match?, #modify_selector, #named_params, #named_params=, #params, #params=, #prepend_child, #raw_text?, #rebuild_children, #remove, #remove_following, #reparent, #replace, #text, #unlink, #wrap
Constructor Details
#initialize(raw_content) ⇒ Root
Returns a new instance of Root.
236 237 238 |
# File 'lib/nora_mark/parser.kpeg.rb', line 236 def initialize(raw_content) @raw_content = raw_content end |
Instance Attribute Details
#document_name ⇒ Object
Returns the value of attribute document_name.
319 320 321 |
# File 'lib/nora_mark/node.rb', line 319 def document_name @document_name end |
#raw_content ⇒ Object (readonly)
Returns the value of attribute raw_content.
239 240 241 |
# File 'lib/nora_mark/parser.kpeg.rb', line 239 def raw_content @raw_content end |
Instance Method Details
#assign_pageno ⇒ Object
321 322 323 324 325 326 327 328 329 |
# File 'lib/nora_mark/node.rb', line 321 def assign_pageno @first_child.inject(1) do |page_no, node| if node.kind_of? Page node.page_no = page_no page_no = page_no + 1 end page_no end end |