Module: Erubis

### Home Classes Methods

### In Files

- lib/erubis/context.rb
- lib/erubis/converter.rb
- lib/erubis/engine/ec.rb
- lib/erubis/engine/ecpp.rb
- lib/erubis/engine/ejava.rb
- lib/erubis/engine/ejavascript.rb
- lib/erubis/engine/enhanced.rb
- lib/erubis/engine/eperl.rb
- lib/erubis/engine/ephp.rb
- lib/erubis/engine/eruby.rb
- lib/erubis/engine/escheme.rb
- lib/erubis/engine/optimized.rb
- lib/erubis/engine.rb
- lib/erubis/enhancer.rb
- lib/erubis/error.rb
- lib/erubis/evaluator.rb
- lib/erubis/generator.rb
- lib/erubis/helper.rb
- lib/erubis/helpers/rails_form_helper.rb
- lib/erubis/helpers/rails_helper.rb
- lib/erubis/main.rb
- lib/erubis/preprocessing.rb
- lib/erubis/tiny.rb
- lib/erubis.rb

### Namespace

- MODULE Erubis::ArrayBufferEnhancer
- MODULE Erubis::ArrayEnhancer
- MODULE Erubis::Basic
- MODULE Erubis::BiPatternEnhancer
- MODULE Erubis::CGenerator
- MODULE Erubis::Converter
- MODULE Erubis::CppGenerator
- MODULE Erubis::DeleteIndentEnhancer
- MODULE Erubis::ErboutEnhancer
- MODULE Erubis::EscapeEnhancer
- MODULE Erubis::Evaluator
- MODULE Erubis::Generator
- MODULE Erubis::HeaderFooterEnhancer
- MODULE Erubis::Helpers
- MODULE Erubis::InterpolationEnhancer
- MODULE Erubis::JavaGenerator
- MODULE Erubis::JavascriptGenerator
- MODULE Erubis::NoCodeEnhancer
- MODULE Erubis::NoTextEnhancer
- MODULE Erubis::OptimizedGenerator
- MODULE Erubis::PI
- MODULE Erubis::PercentLineEnhancer
- MODULE Erubis::PerlGenerator
- MODULE Erubis::PhpGenerator
- MODULE Erubis::PrefixedLineEnhancer
- MODULE Erubis::PreprocessingHelper
- MODULE Erubis::PrintEnabledEnhancer
- MODULE Erubis::PrintOutEnhancer
- MODULE Erubis::RubyEvaluator
- MODULE Erubis::RubyGenerator
- MODULE Erubis::SchemeGenerator
- MODULE Erubis::SimplifyEnhancer
- MODULE Erubis::StdoutEnhancer
- MODULE Erubis::StringBufferEnhancer
- MODULE Erubis::XmlHelper
- CLASS Erubis::ArrayBufferEruby
- CLASS Erubis::ArrayEruby
- CLASS Erubis::BiPatternEruby
- CLASS Erubis::CommandOptionError
- CLASS Erubis::Context
- CLASS Erubis::DeleteIndentEruby
- CLASS Erubis::Ec
- CLASS Erubis::Ecpp
- CLASS Erubis::Ejava
- CLASS Erubis::Ejavascript
- CLASS Erubis::Ejs
- CLASS Erubis::Engine
- CLASS Erubis::Eperl
- CLASS Erubis::Ephp
- CLASS Erubis::ErboutEruby
- CLASS Erubis::ErubisError
- CLASS Erubis::Eruby
- CLASS Erubis::EscapedEc
- CLASS Erubis::EscapedEcpp
- CLASS Erubis::EscapedEjava
- CLASS Erubis::EscapedEjavascript
- CLASS Erubis::EscapedEjs
- CLASS Erubis::EscapedEperl
- CLASS Erubis::EscapedEphp
- CLASS Erubis::EscapedEruby
- CLASS Erubis::EscapedEscheme
- CLASS Erubis::Escheme
- CLASS Erubis::FastEruby
- CLASS Erubis::HeaderFooterEruby
- CLASS Erubis::InterpolationEruby
- CLASS Erubis::Main
- CLASS Erubis::NoCodeEruby
- CLASS Erubis::NoTextEruby
- CLASS Erubis::NotSupportedError
- CLASS Erubis::OptimizedEruby
- CLASS Erubis::OptimizedXmlEruby
- CLASS Erubis::PercentLineEruby
- CLASS Erubis::PrefixedLineEruby
- CLASS Erubis::PreprocessingEruby
- CLASS Erubis::PrintEnabledEruby
- CLASS Erubis::PrintOutEruby
- CLASS Erubis::PrintOutSimplifiedEruby
- CLASS Erubis::SimplifiedEruby
- CLASS Erubis::StdoutEruby
- CLASS Erubis::StdoutSimplifiedEruby
- CLASS Erubis::StringBufferEruby
- CLASS Erubis::StringIOEruby
- CLASS Erubis::TinyEruby
- CLASS Erubis::XmlEruby

### Class/Module Index

Quicksearch

- Erubis
- Erubis::ArrayBufferEnhancer
- Erubis::ArrayBufferEruby
- Erubis::ArrayEnhancer
- Erubis::ArrayEruby
- Erubis::Basic
- Erubis::Basic::Converter
- Erubis::Basic::Engine
- Erubis::BiPatternEnhancer
- Erubis::BiPatternEruby
- Erubis::CGenerator
- Erubis::CommandOptionError
- Erubis::Context
- Erubis::Converter
- Erubis::CppGenerator
- Erubis::DeleteIndentEnhancer
- Erubis::DeleteIndentEruby
- Erubis::Ec
- Erubis::Ecpp
- Erubis::Ejava
- Erubis::Ejavascript
- Erubis::Ejs
- Erubis::Engine
- Erubis::Eperl
- Erubis::Ephp
- Erubis::ErboutEnhancer
- Erubis::ErboutEruby
- Erubis::ErubisError
- Erubis::Eruby
- Erubis::EscapeEnhancer
- Erubis::EscapedEc
- Erubis::EscapedEcpp
- Erubis::EscapedEjava
- Erubis::EscapedEjavascript
- Erubis::EscapedEjs
- Erubis::EscapedEperl
- Erubis::EscapedEphp
- Erubis::EscapedEruby
- Erubis::EscapedEscheme
- Erubis::Escheme
- Erubis::Evaluator
- Erubis::FastEruby
- Erubis::Generator
- Erubis::HeaderFooterEnhancer
- Erubis::HeaderFooterEruby
- Erubis::Helpers
- Erubis::Helpers::RailsFormHelper
- Erubis::Helpers::RailsHelper
- Erubis::Helpers::RailsHelper::TemplateConverter
- Erubis::InterpolationEnhancer
- Erubis::InterpolationEruby
- Erubis::JavaGenerator
- Erubis::JavascriptGenerator
- Erubis::Main
- Erubis::NoCodeEnhancer
- Erubis::NoCodeEruby
- Erubis::NoTextEnhancer
- Erubis::NoTextEruby
- Erubis::NotSupportedError
- Erubis::OptimizedEruby
- Erubis::OptimizedGenerator
- Erubis::OptimizedXmlEruby
- Erubis::PI
- Erubis::PI::Converter
- Erubis::PI::Ec
- Erubis::PI::Ecpp
- Erubis::PI::Ejava
- Erubis::PI::Ejavascript
- Erubis::PI::Engine
- Erubis::PI::Eperl
- Erubis::PI::Ephp
- Erubis::PI::Eruby
- Erubis::PI::Escheme
- Erubis::PI::TinyEruby
- Erubis::PercentLineEnhancer
- Erubis::PercentLineEruby
- Erubis::PerlGenerator
- Erubis::PhpGenerator
- Erubis::PrefixedLineEnhancer
- Erubis::PrefixedLineEruby
- Erubis::PreprocessingEruby
- Erubis::PreprocessingHelper
- Erubis::PrintEnabledEnhancer
- Erubis::PrintEnabledEruby
- Erubis::PrintOutEnhancer
- Erubis::PrintOutEruby
- Erubis::PrintOutSimplifiedEruby
- Erubis::RubyEvaluator
- Erubis::RubyGenerator
- Erubis::SchemeGenerator
- Erubis::SimplifiedEruby
- Erubis::SimplifyEnhancer
- Erubis::StdoutEnhancer
- Erubis::StdoutEruby
- Erubis::StdoutSimplifiedEruby
- Erubis::StringBufferEnhancer
- Erubis::StringBufferEruby
- Erubis::StringIOEruby
- Erubis::TinyEruby
- Erubis::XmlEruby
- Erubis::XmlHelper
- ActionView
- ActionView::TemplateHandlers
- ActionView::TemplateHandlers::ErubisHandler
- ERB
- Kernel

No matching classes.

# Erubis

$Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.

$Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.

$Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.

$Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.

$Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.

$Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.

an implementation of eRuby

ex.

    input = <<'END'
     <ul>
      <% for item in @list %>
       <li><%= item %>
           <%== item %></li>
      <% end %>
     </ul>
    END
    list = ['<aaa>', 'b&b', '"ccc"']
    eruby = Erubis::Eruby.new(input)
    puts "--- code ---"
    puts eruby.src
    puts "--- result ---"
    context = Erubis::Context.new()   # or new(:list=>list)
    context[:list] = list
    puts eruby.evaluate(context)

result:

    --- source ---
    _buf = ''; _buf << '<ul>
    ';  for item in @list
     _buf << '  <li>'; _buf << ( item ).to_s; _buf << '
    '; _buf << '      '; _buf << Erubis::XmlHelper.escape_xml( item ); _buf << '</li>
    ';  end
     _buf << '</ul>
    ';
    _buf.to_s
    --- result ---
     <ul>
       <li><aaa>
           &lt;aaa&gt;</li>
       <li>b&b
           b&amp;b</li>
       <li>"ccc"
           &quot;ccc&quot;</li>
     </ul>

### Constants

EMPTY_BINDING
Ejs
EscapedEjs
VERSION

[Validate]

Generated with the Darkfish Rdoc Generator 2.