Amrita Question

Hi.

I’m on to part B – using Amrita now.

Is there a way to output formatted HTML to Amrita?

$ cat hello.rb
require "amrita/template"
include Amrita

tmpl = TemplateFile.new(“template.html”)
data = {
:title => “hello world”,
:body => “Amrita is a html template library for Ruby”
}
tmpl.expand(STDOUT, data)

$ ruby hello.rb

hello world

<b>Amrita</b> is a html template library for Ruby

Amrita 1.0.2 – ruby 1.7.3 – mswin32

Thanks, once again.

Regards,

-mark.

regarding Amrita Question:

Is there a way to output formatted HTML to Amrita?

I originally replied off-list cos I lost the original email, but I have
found it now so am posting again for the archives :slight_smile:

I believe that SanitizedString is the solution to this problem:

SanitizedString[“Hello”] => “Hello

Cheers,
Martin

···

On 1/9/03, 1:50:10 AM, Mark Probert probertm@nortelnetworks.com wrote


Martin Hart Tel: +44 (0) 1582 618468
Arnclan Fax: +44 (0) 1582 619596
Union Street, E-mail: martin@zsdfherg.com
Dunstable, Beds LU6 1EX

Hi, Martin.

Martin Hart wrote in comp.lang.ruby:

Is there a way to output formatted HTML to Amrita?

I believe that SanitizedString is the solution to this problem:

Indeed it is! Thank you very much for that.

regards,

-mark.