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
62 63 64 |
# File 'lib/giblish/application.rb', line 62 def adoc_source(src_node, dst_node, dst_top) File.read(src_node.pathname) end |
#document_attributes(src_node, dst_node, dst_top) ⇒ Object
66 67 68 69 70 71 72 73 |
# File 'lib/giblish/application.rb', line 66 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 |