Global Information Lookup Global Information

ERuby information


eRuby
Other namesERB
Repositorygithub.com/ruby/erb
Written inRuby
TypeTemplate engine
LicenseBSD 2-Clause License

Embedded Ruby (also shortened as ERB) is a templating system that embeds Ruby into a text document. It is often used to embed Ruby code in an HTML document, similar to ASP and JSP, and PHP and other server-side scripting languages. The templating system of eRuby combines Ruby code and plain text to provide flow control and variable substitution, thus making the combined code easier to maintain.[1]

The View module of Ruby on Rails is responsible for displaying the response or output on a browser. In its simplest form, a view can be a piece of HTML code which has some static content. For most applications, just having static content may not be enough. Many Ruby on Rails applications will require dynamic content created by the controller (action method) to be displayed in their view. This is made possible by using Embedded Ruby to generate templates which can contain dynamic content. Embedded Ruby allows ruby code to be embedded in a view document. This code gets replaced with proper value resulted from the execution of the code at run time. But, by having the ability to embed code in a view document, we risk bridging the clear separation present in the MVC frame. It is thus the responsibility of the developer to make sure that there is a clear separation of responsibility among the model, view and controller modules of his/her application.[2]

  1. ^ Brown, Gregory (2009). Ruby Best Practices. O'Reilly. pp. 279–281. ISBN 978-0596523008.
  2. ^ Cite error: The named reference :2 was invoked but never defined (see the help page).

and 7 Related for: ERuby information

Request time (Page generated in 0.5257 seconds.)

ERuby

Last Update:

PHP and other server-side scripting languages. The templating system of eRuby combines Ruby code and plain text to provide flow control and variable substitution...

Word Count : 1677

Haml

Last Update:

document and make the HTML cleaner. Similar to other template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates...

Word Count : 1093

Template processor

Last Update:

modules. JavaServer Pages, Active Server Pages, Genshi (for Python), and eRuby are examples of template engines designed specifically for web application...

Word Count : 1078

Erb

Last Update:

resolution bandwidth Equivalent rectangular bandwidth Erb, an implementation of eRuby Edgar Rice Burroughs, Inc., an American media company Educational Records...

Word Count : 360

Markaby

Last Update:

sample page', :href => '/sample' } end end # The `sample' view. def sample p 'A sample page' end end eRuby Haml Project homepage Screencast example v t e...

Word Count : 308

Web template system

Last Update:

platform). See also: VBScript, Javascript, PerlScript, etc. extensions for ASP. eRuby Public (Ruby). ColdFusion Markup Language (CFM) Public (Lucee, Railo, OpenBD)...

Word Count : 1338

Comparison of web template engines

Last Update:

Language Java Eclipse Public License Yes Yes Yes Yes Yes Yes Yes Yes No Yes No eRuby Ruby GNU GPL / Ruby License Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes No FreeMarker...

Word Count : 193

PDF Search Engine © AllGlobal.net