Sha256: 9c08d5b024c8dcc8dd2123167bd36ff65dd0b7c4c4a4ab59f4b81499411c1225

Contents?: true

Size: 372 Bytes

Versions: 13

Compression:

Stored size: 372 Bytes

Contents

module Vedeu
  class Template
    def self.parse(object, path)
      new(object, path).parse
    end

    def initialize(object, path)
      @object, @path = object, path
    end

    def parse
      ERB.new(load, nil, '-').result(binding)
    end

    private

    attr_reader :object, :path

    def load
      File.read(File.dirname(__FILE__) + path)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vedeu-0.1.0 lib/vedeu/output/template.rb
vedeu-0.0.42 lib/vedeu/output/template.rb
vedeu-0.0.41 lib/vedeu/output/template.rb
vedeu-0.0.40 lib/vedeu/output/template.rb
vedeu-0.0.39 lib/vedeu/output/template.rb
vedeu-0.0.38 lib/vedeu/output/template.rb
vedeu-0.0.37 lib/vedeu/output/template.rb
vedeu-0.0.36 lib/vedeu/output/template.rb
vedeu-0.0.35 lib/vedeu/output/template.rb
vedeu-0.0.34 lib/vedeu/output/template.rb
vedeu-0.0.33 lib/vedeu/output/template.rb
vedeu-0.0.32 lib/vedeu/output/template.rb
vedeu-0.0.31 lib/vedeu/output/template.rb