Sha256: 8bfffcf39d6b9c55d7d4d9ef46e05f258d2a553f49f4a5ac4a5d768d3698f07c

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

module Prmd
  def self.render(schema, options={})
    doc = ''

    if options[:prepend]
      doc << options[:prepend].map {|path| File.read(path)}.join("\n") << "\n"
    end

    doc << Erubis::Eruby.new(File.read(options[:template])).result({
      options:         options,
      schema:          schema
    })

    doc
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prmd-0.3.2 lib/prmd/commands/render.rb
prmd-0.3.1 lib/prmd/commands/render.rb
prmd-0.3.0 lib/prmd/commands/render.rb