class Jekyll::Latex::Pdf::KramdownData

Hold data for kramdown renderer. We have some extra things added to the default post content.

Attributes

data[R]

Public Class Methods

new(*args) click to toggle source
# File lib/jekyll/latex/pdf/kramdown_data.rb, line 11
def initialize(*args)
  add(*args)
end

Public Instance Methods

add(*args) click to toggle source
# File lib/jekyll/latex/pdf/kramdown_data.rb, line 15
def add(*args)
  @data ||= {}
  @data.merge! hash_args(*args)
end

Private Instance Methods

hash_args(*args) click to toggle source
# File lib/jekyll/latex/pdf/kramdown_data.rb, line 24
def hash_args(*args)
  hashed_args = args.detect {|f| f.class == Hash }
  hashed_args.each_with_object({}) {|(k, v), memo| memo[k.to_sym] = v; }
end