Sha256: 6dd36dcb3e9b25ca4a14884bd2de7d4cf35fa50bf38bace02da65be92fa4961e

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

module Dox
  module Printers
    class BasePrinter

      attr_reader :descriptions_folder_path

      def initialize(output)
        @output = output
        @descriptions_folder_path = Dox.config.desc_folder_path
      end

      def print
        raise NotImplementedError
      end

      private

      def print_desc(desc)
        return unless desc.present?

        if desc.to_s =~ /.*\.md$/
          path = descriptions_folder_path.join(desc).to_s
          "<!-- include(#{path}) -->"
        else
          desc
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dox-0.0.3 lib/dox/printers/base_printer.rb
dox-0.0.2 lib/dox/printers/base_printer.rb