Module: Padrino::Erubis::SafeBufferEnhancer

### Home Classes Methods

### In Files

- lib/padrino-core/application/rendering/extensions/erubis.rb

### Methods

- #add_expr_escaped
- #add_expr_literal
- #add_text

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Application
- Padrino::ApplicationLoadError
- Padrino::ApplicationSetupError
- Padrino::Cli
- Padrino::Cli::Adapter
- Padrino::Cli::Base
- Padrino::Erubis
- Padrino::Erubis::SafeBufferEnhancer
- Padrino::Erubis::SafeBufferTemplate
- Padrino::Erubis::Template
- Padrino::Filter
- Padrino::Flash
- Padrino::Flash::Helpers
- Padrino::Flash::Storage
- Padrino::Logger
- Padrino::Logger::Colorize
- Padrino::Logger::Extensions
- Padrino::Logger::Rack
- Padrino::Module
- Padrino::Mounter
- Padrino::Mounter::MounterException
- Padrino::Reloader
- Padrino::Reloader::Rack
- Padrino::Rendering
- Padrino::Rendering::ClassMethods
- Padrino::Rendering::InstanceMethods
- Padrino::Rendering::SafeTemplate
- Padrino::Rendering::TemplateNotFound
- Padrino::Router
- Padrino::Routing
- Padrino::Routing::ClassMethods
- Padrino::Routing::InstanceMethods
- Padrino::Routing::Parent
- Padrino::Routing::UnrecognizedException
- Padrino::Server
- Padrino::ShowExceptions
- Padrino::Tasks
- Padrino::Utils
- HttpRouter
- HttpRouter::Node
- HttpRouter::Node::Path
- HttpRouter::Request
- HttpRouter::Route
- Haml
- Haml::Helpers
- Haml::Util
- Sinatra
- Sinatra::Request
- Slim
- Slim::Template
- Tilt
- Tilt::HamlTemplate
- FileSet
- Kernel
- Module
- Object
- ObjectSpace
- PadrinoTasks
- String
- SupportLite

No matching classes.

# Padrino::Erubis::SafeBufferEnhancer

SafeBufferEnhancer is an Erubis Enhancer that compiles templates that are fit for using ActiveSupport::SafeBuffer as a Buffer.

@api private

### Public Instance Methods

add_expr_escaped(src, code) click to toggle source

    # File lib/padrino-core/application/rendering/extensions/erubis.rb, line 16
    def add_expr_escaped(src, code)
      src << " #{@bufvar}.safe_concat " << code << ';'
    end

add_expr_literal(src, code) click to toggle source

    # File lib/padrino-core/application/rendering/extensions/erubis.rb, line 12
    def add_expr_literal(src, code)
      src << " #{@bufvar}.concat((" << code << ').to_s);'
    end

add_text(src, text) click to toggle source

    # File lib/padrino-core/application/rendering/extensions/erubis.rb, line 20
    def add_text(src, text)
      src << " #{@bufvar}.safe_concat '" << escape_text(text) << "';" unless text.empty?
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.