Class: JekyllPandocMultipleFormats::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-pandoc-multiple-formats/config.rb

Constant Summary collapse

DEFAULTS =
{
  'skip'              => false,
  'bundle_permalink'  => ':output_ext/:slug.:output_ext',
  'papersize'         => 'a5paper',
  'sheetsize'         => 'a4paper',
  'imposition'        => true,
  'binder'            => true,
  'signature'         => 20,
  'flags'             => '--smart',
  'site_flags'        => '--toc',
  'outputs'           => {},
  'covers_dir'        => 'images/'
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Config

Returns a new instance of Config.



19
20
21
# File 'lib/jekyll-pandoc-multiple-formats/config.rb', line 19

def initialize(config = {})
  @config = Jekyll::Utils.deep_merge_hashes(DEFAULTS, config)
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



17
18
19
# File 'lib/jekyll-pandoc-multiple-formats/config.rb', line 17

def config
  @config
end

Instance Method Details

#binder?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/jekyll-pandoc-multiple-formats/config.rb', line 31

def binder?
  @config['binder']
end

#imposition?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/jekyll-pandoc-multiple-formats/config.rb', line 27

def imposition?
  @config['imposition']
end

#outputsObject

TODO magic



36
37
38
# File 'lib/jekyll-pandoc-multiple-formats/config.rb', line 36

def outputs
  @config['outputs']
end

#skip?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/jekyll-pandoc-multiple-formats/config.rb', line 23

def skip?
  @config['skip']
end