Class: Giblish::PdfLayoutConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/giblish/configurator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config_opts) ⇒ PdfLayoutConfig

Returns a new instance of PdfLayoutConfig.



52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/giblish/configurator.rb', line 52

def initialize(config_opts)
  @adoc_api_opts = {backend: "pdf"}
  @pre_builders = []
  @post_builders = []
  @adoc_extensions = {}
  @docattr_providers = []

  unless config_opts.resource_dir.nil?
    # generate pdf using asciidoctor-pdf with custom styling
    rp = ResourcePaths.new(config_opts)
    @docattr_providers << PdfCustomStyle.new(rp.src_style_path_abs, *rp.font_dirs_abs.to_a)
  end
end

Instance Attribute Details

#adoc_api_optsObject (readonly)

Returns the value of attribute adoc_api_opts.



50
51
52
# File 'lib/giblish/configurator.rb', line 50

def adoc_api_opts
  @adoc_api_opts
end

#adoc_extensionsObject (readonly)

Returns the value of attribute adoc_extensions.



50
51
52
# File 'lib/giblish/configurator.rb', line 50

def adoc_extensions
  @adoc_extensions
end

#docattr_providersObject (readonly)

Returns the value of attribute docattr_providers.



50
51
52
# File 'lib/giblish/configurator.rb', line 50

def docattr_providers
  @docattr_providers
end

#post_buildersObject (readonly)

Returns the value of attribute post_builders.



50
51
52
# File 'lib/giblish/configurator.rb', line 50

def post_builders
  @post_builders
end

#pre_buildersObject (readonly)

Returns the value of attribute pre_builders.



50
51
52
# File 'lib/giblish/configurator.rb', line 50

def pre_builders
  @pre_builders
end