Sha256: 55b66e08e8f6477ef45eff971a543024a3e34f7af3b381d0271a30c92621ff3c

Contents?: true

Size: 216 Bytes

Versions: 8

Compression:

Stored size: 216 Bytes

Contents

require 'erb'

module ServiceMock
  module RenderSubTemplate

    def render(path)
      content = File.read(File.expand_path(path))
      template = ERB.new(content)
      template.result(binding)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
service_mock-0.5.2 lib/service_mock/render_subtemplate.rb
service_mock-0.5.1 lib/service_mock/render_subtemplate.rb
service_mock-0.5 lib/service_mock/render_subtemplate.rb
service_mock-0.4 lib/service_mock/render_subtemplate.rb
service_mock-0.3.1 lib/service_mock/render_subtemplate.rb
service_mock-0.3 lib/service_mock/render_subtemplate.rb
service_mock-0.2 lib/service_mock/render_subtemplate.rb
service_mock-0.1 lib/service_mock/render_subtemplate.rb