Class: Giblish::SuccessfulConversion
- Inherits:
-
ConversionInfo
- Object
- ConversionInfo
- Giblish::SuccessfulConversion
- Defined in:
- lib/giblish/conversion_info.rb
Overview
Provide data and access methods available when a conversion has succeeded
Instance Attribute Summary collapse
-
#adoc ⇒ Object
readonly
Returns the value of attribute adoc.
-
#dst_rel_path ⇒ Object
readonly
The relative Pathname from the root dir to the dst file Ex Pathname(“my/subdir/file1.html”).
-
#purpose_str ⇒ Object
readonly
Returns the value of attribute purpose_str.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
Attributes inherited from ConversionInfo
#converted, #dst_node, #dst_top, #src_node, #src_rel_path
Instance Method Summary collapse
- #docid ⇒ Object
-
#initialize(src_node:, dst_node:, dst_top:, adoc:, adoc_stderr: "") ⇒ SuccessfulConversion
constructor
A new instance of SuccessfulConversion.
Methods inherited from ConversionInfo
Constructor Details
#initialize(src_node:, dst_node:, dst_top:, adoc:, adoc_stderr: "") ⇒ SuccessfulConversion
Returns a new instance of SuccessfulConversion.
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/giblish/conversion_info.rb', line 70 def initialize(src_node:, dst_node:, dst_top:, adoc:, adoc_stderr: "") super(converted: true, src_node: src_node, dst_node: dst_node, dst_top: dst_top) @adoc = adoc @stderr = adoc_stderr @title = @adoc.doctitle @dst_rel_path = dst_node.relative_path_from(dst_top) # Cach the purpose info if it exists @purpose_str = get_purpose_info adoc end |
Instance Attribute Details
#adoc ⇒ Object (readonly)
Returns the value of attribute adoc.
62 63 64 |
# File 'lib/giblish/conversion_info.rb', line 62 def adoc @adoc end |
#dst_rel_path ⇒ Object (readonly)
The relative Pathname from the root dir to the dst file Ex Pathname(“my/subdir/file1.html”)
66 67 68 |
# File 'lib/giblish/conversion_info.rb', line 66 def dst_rel_path @dst_rel_path end |
#purpose_str ⇒ Object (readonly)
Returns the value of attribute purpose_str.
68 69 70 |
# File 'lib/giblish/conversion_info.rb', line 68 def purpose_str @purpose_str end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
62 63 64 |
# File 'lib/giblish/conversion_info.rb', line 62 def stderr @stderr end |
Instance Method Details
#docid ⇒ Object
83 84 85 |
# File 'lib/giblish/conversion_info.rb', line 83 def docid @adoc.attributes["docid"] end |