Class: Giblish::PdfLayoutConfig
- Inherits:
-
Object
- Object
- Giblish::PdfLayoutConfig
- Defined in:
- lib/giblish/configurator.rb
Instance Attribute Summary collapse
-
#adoc_api_opts ⇒ Object
readonly
Returns the value of attribute adoc_api_opts.
-
#adoc_extensions ⇒ Object
readonly
Returns the value of attribute adoc_extensions.
-
#docattr_providers ⇒ Object
readonly
Returns the value of attribute docattr_providers.
-
#post_builders ⇒ Object
readonly
Returns the value of attribute post_builders.
-
#pre_builders ⇒ Object
readonly
Returns the value of attribute pre_builders.
Instance Method Summary collapse
-
#initialize(resource_paths) ⇒ PdfLayoutConfig
constructor
A new instance of PdfLayoutConfig.
Constructor Details
#initialize(resource_paths) ⇒ PdfLayoutConfig
Returns a new instance of PdfLayoutConfig.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/giblish/configurator.rb', line 72 def initialize(resource_paths) @adoc_api_opts = {backend: "pdf"} @pre_builders = [] @post_builders = [] @adoc_extensions = {} @docattr_providers = [] begin require "asciidoctor-mathematical" cc = PdfMathPostbuilder.new @post_builders << cc @docattr_providers << cc rescue LoadError Giblog.logger.warn { "Did not find asciidoctor-mathematical. stem blocks will not be rendered correctly!" } end if resource_paths.src_style_path_abs # generate pdf using asciidoctor-pdf with custom styling @docattr_providers << PdfCustomStyle.new( resource_paths.src_style_path_abs, *resource_paths.font_dirs_abs.to_a ) end end |
Instance Attribute Details
#adoc_api_opts ⇒ Object (readonly)
Returns the value of attribute adoc_api_opts.
70 71 72 |
# File 'lib/giblish/configurator.rb', line 70 def adoc_api_opts @adoc_api_opts end |
#adoc_extensions ⇒ Object (readonly)
Returns the value of attribute adoc_extensions.
70 71 72 |
# File 'lib/giblish/configurator.rb', line 70 def adoc_extensions @adoc_extensions end |
#docattr_providers ⇒ Object (readonly)
Returns the value of attribute docattr_providers.
70 71 72 |
# File 'lib/giblish/configurator.rb', line 70 def docattr_providers @docattr_providers end |
#post_builders ⇒ Object (readonly)
Returns the value of attribute post_builders.
70 71 72 |
# File 'lib/giblish/configurator.rb', line 70 def post_builders @post_builders end |
#pre_builders ⇒ Object (readonly)
Returns the value of attribute pre_builders.
70 71 72 |
# File 'lib/giblish/configurator.rb', line 70 def pre_builders @pre_builders end |