module Hologram

  #Helper class for binding things for ERB
  class TemplateVariables
    attr_accessor :title, :file_name, :blocks, :output_files_by_category, :config, :pages

    def initialize(args)
      set_args(args)
    end

    def set_args(args)
      args.each do |k,v|
        instance_variable_set("@#{k}", v) unless v.nil?
      end
    end

    def get_binding
      binding()
    end
  end
end

module Hologram

  #Helper class for binding things for ERB
  class TemplateVariables
    attr_accessor :title, :file_name, :blocks, :output_files_by_category, :config, :pages

    def initialize(args)
      set_args(args)
    end

    def set_args(args)
      args.each do |k,v|
        instance_variable_set("@#{k}", v)
      end
    end

    def get_binding
      binding()
    end
  end
end

Allow template variables to be set as nil
Allow template variables to be set as nil

This is needed so that erb files do not have :blocks set sometimes but
nil at other times. Without this change if an erb file is processed
before a documentation page, blocks will (and other related vars) will be
nil while after documentation pages are processed blocks will be set for
erbs. That was unintentional and this fixes it.
