Sha256: accac0a93f74777cb19d9bf143d5d1813d050eb51037c7a11210db425dc1a9af

Contents?: true

Size: 310 Bytes

Versions: 17

Compression:

Stored size: 310 Bytes

Contents

module Source2MD
  class Section
    def initialize(content)
      @content = content
    end

    def to_md
      elements.collect(&:to_md).compact * "\n\n"
    end

    private

    def elements
      @elements ||= Scanner.new(@content).to_a.collect do |e|
        Element.new(e)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
source2md-0.0.19 lib/source2md/section.rb
source2md-0.0.18 lib/source2md/section.rb
source2md-0.0.17 lib/source2md/section.rb
source2md-0.0.16 lib/source2md/section.rb
source2md-0.0.15 lib/source2md/section.rb
source2md-0.0.14 lib/source2md/section.rb
source2md-0.0.13 lib/source2md/section.rb
source2md-0.0.12 lib/source2md/section.rb
source2md-0.0.11 lib/source2md/section.rb
source2md-0.0.10 lib/source2md/section.rb
source2md-0.0.9 lib/source2md/section.rb
source2md-0.0.8 lib/source2md/section.rb
source2md-0.0.7 lib/source2md/section.rb
source2md-0.0.6 lib/source2md/section.rb
source2md-0.0.5 lib/source2md/section.rb
source2md-0.0.4 lib/source2md/section.rb
source2md-0.0.3 lib/source2md/section.rb