Class: Giblish::DirTreeConvert::AdocFileProvider
- Inherits:
-
Object
- Object
- Giblish::DirTreeConvert::AdocFileProvider
- Defined in:
- lib/giblish/application.rb
Overview
This class provides a file as the source for the asciidoc info and sets the document attributes required by Asciidoctor to resolve ‘imagesdir’ et al.
Instance Method Summary collapse
- #adoc_source(src_node, dst_node, dst_top) ⇒ Object
- #document_attributes(src_node, dst_node, dst_top) ⇒ Object
Instance Method Details
#adoc_source(src_node, dst_node, dst_top) ⇒ Object
15 16 17 |
# File 'lib/giblish/application.rb', line 15 def adoc_source(src_node, dst_node, dst_top) File.read(src_node.pathname) end |
#document_attributes(src_node, dst_node, dst_top) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/giblish/application.rb', line 19 def document_attributes(src_node, dst_node, dst_top) p = src_node.pathname { "docfile" => p.to_s, "docdir" => p.dirname.to_s, "docname" => p.basename.to_s } end |