Sha256: 6b2050c52ba35058bdecf2c1672a178a9121c8b7a8f4f9200e6f5d29684adfc1

Contents?: true

Size: 411 Bytes

Versions: 6

Compression:

Stored size: 411 Bytes

Contents

module Coradoc
  module Element
    class Include
      attr_accessor :text

      def initialize(path, options = {})
        @path = path
        @attributes = options.fetch(:attributes, AttributeList.new)
        @line_break = options.fetch(:line_break, "\n")
      end

      def to_adoc
        attrs = @attributes.to_adoc(true)
        "include::#{@path}#{attrs}#{@line_break}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
coradoc-1.1.6 lib/coradoc/element/include.rb
coradoc-1.1.5 lib/coradoc/element/include.rb
coradoc-1.1.4 lib/coradoc/element/include.rb
coradoc-1.1.3 lib/coradoc/element/include.rb
coradoc-1.1.2 lib/coradoc/element/include.rb
coradoc-1.1.1 lib/coradoc/element/include.rb