Sha256: d0b935c18117d63c03860ab853f7e538a8cc0b096373019937593323cdc4db8a

Contents?: true

Size: 368 Bytes

Versions: 15

Compression:

Stored size: 368 Bytes

Contents

require 'flapjack/utility'

module ErbViewHelper

  TEMPLATE_PATH = File.dirname(__FILE__) +
      '/../../lib/flapjack/gateways/web/views/'

  include Flapjack::Utility

  def render_erb(file, bind)
    erb = ERB.new(File.read(TEMPLATE_PATH + file))
    erb.result(bind)
  end

  def h(text)
    ERB::Util.h(text)
  end

  def u(text)
    ERB::Util.u(text)
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
flapjack-0.7.35 spec/support/erb_view_helper.rb
flapjack-0.7.34 spec/support/erb_view_helper.rb
flapjack-0.7.33 spec/support/erb_view_helper.rb
flapjack-0.7.32 spec/support/erb_view_helper.rb
flapjack-0.7.31 spec/support/erb_view_helper.rb
flapjack-0.7.30 spec/support/erb_view_helper.rb
flapjack-0.7.29 spec/support/erb_view_helper.rb
flapjack-0.7.28 spec/support/erb_view_helper.rb
flapjack-0.7.27 spec/support/erb_view_helper.rb
flapjack-0.7.26 spec/support/erb_view_helper.rb
flapjack-0.7.25 spec/support/erb_view_helper.rb
flapjack-0.7.22 spec/support/erb_view_helper.rb
flapjack-0.7.21 spec/support/erb_view_helper.rb
flapjack-0.7.20 spec/support/erb_view_helper.rb
flapjack-0.7.19 spec/support/erb_view_helper.rb