The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
RDoc's TemplatePage removed from Ruby

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
RDoc's TemplatePage removed from Ruby Posted: Jan 7, 2008 3:41 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: RDoc's TemplatePage removed from Ruby
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

If you’ve got a custom RDoc template, it won’t work with the next release of 1.9. I’ve removed the custom TemplatePage and replaced it with an ERB-based version that works similarly.

This should make it much, much easier to write a custom RDoc template as you can now use arbitrary ruby code inside your templates.

It’s really easy to convert an old RDoc template to the upcoming version:

Replace thisWith this
%blah%<%= values["blah"] %>
!INCLUDE!<%= template_include %>
HREF:aref:name<%= href values["aref"], values["name"] %>
IF:blah<% if values["blah"] then %>
IFNOT:blah<% unless values["blah"] then %>
ENDIF:blah<% end %>
START:blah<% values["blah"].each do |blah| %>
END:blah<% end %>

To make nested loops easier to convert, convert START statements to:

<% values["blah"].each do |blah| $stderr.puts blah.keys %>

So you can see what is being used inside which loop.

I’ve also removed the old_html template, as I don’t think anybody uses it anymore, and updated all the existing templates in RDoc to use ERB. (If somebody could double-check my work on the CHM and XML outputters, that would be great.)

Read: RDoc's TemplatePage removed from Ruby

Topic: CSV transmogrifies into FasterCSV in Ruby 1.9 Previous Topic   Next Topic Topic: 10-Minute Quick Start Guide for Facebooker - Create a Facebook Desktop Script Using Ruby in 5...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use