=begin
  gettext/erb.rb - GetText for ERB

  Copyright (C) 2005  Masao Mutoh

  You may redistribute it and/or modify it under the same
  license terms as Ruby.

  $Id: erb.rb,v 1.1.1.1 2005/08/13 02:38:09 mutoh Exp $
=end

require 'erb'
require 'gettext/container'

module GetText
  module ErbContainer
    include Container

    def eval_src(rhtml)
      erb = ERB.new(rhtml).src
      eval(erb, binding)
    end

    def eval_file(rhtmlpath)
      eval_src(IO.read(rhtmlpath))
    end
  end
end
