Module: GetText::ErbContainer

Module | GetText::ErbContainer
In: | lib/gettext/erb.rb

This module provides basic functions to evaluate plural ERB files(.rhtml) in a TextDomain. You need to implement a class which includes GetText::ErbContainer.

See simple examples below:

     require 'gettext/erb'
     class SimpleContainer
       include GetText::ErbContainer

       def initialize(domainname, domainpath = nil, locale = nil, charset = nil)
         bindtextdomain(domainname, domainpath, locale)
       end
     end

     container = SimpleContainer.new("helloerb1", "locale")
     puts container.eval_file("/your/erb/file.rhtml")

This module is an example for template engines such as ERB. You can implement another implementation easily to read gettext/erb.rb.

### Methods

eval_file eval_src

### Included Modules

GetText

### Public Instance methods

eval_file(rhtmlpath)

Evaluates ERB file in the instance and returns the result HTML.

- rhtml: an ERB file
- Returns: the Evaluated ERB result

eval_src(rhtml)

Evaluates ERB source(String) in the instance and returns the result HTML.

- rhtml: an ERB source
- Returns: the Evaluated ERB result

[Validate]