lib/docx/builder.rb in docx-builder-0.2.3 vs lib/docx/builder.rb in docx-builder-0.3.0

- old
+ new

@@ -2,31 +2,42 @@ require 'rubygems' require 'zip' require 'nokogiri' -require_relative "logger" -require_relative "builder/version" -require_relative "builder/decoder" -require_relative "builder/encoder" +require_relative 'logger' +require_relative 'builder/version' +require_relative 'builder/decoder' +require_relative 'builder/encoder' require_relative 'builder/cleaners' -require_relative "builder/xml_processor" -require_relative "builder/template" -require_relative "builder/configuration" +require_relative 'builder/xml_processor' +require_relative 'builder/template' +require_relative 'builder/configuration' module Docx - module Builder - class << self - def configuration - @configuration ||= Configuration.new - end + # Main module of the gem + # + # @example configuring string placeholder + # Docx::Builder.configure do |config| + # config.null_placeholder = 'XXXX' + # end + # + # @example configuring log level + # Docx::Builder.configure do |config| + # config.logger.level = 1 #info + # end + module Builder + class << self + def configuration + @configuration ||= Configuration.new + end - def logger - configuration.logger - end + def logger + configuration.logger + end - def configure - yield(configuration) - end - end + def configure + yield(configuration) + end end -end \ No newline at end of file + end +end