[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02722] Re: win OLE / eRuby

From: OZAWA Sakuro <crouton@...>
Date: 2000-05-11 02:29:32 UTC
List: ruby-talk #2722
# Sorry for my previous multiple mail. The queue was not flushed.

At Wed, 10 May 2000 14:32:50 -0400,
Andrew Hunt <andy@Toolshed.Com> wrote:

> Umm, I'm a little confused.  There is no eruby binary in the
> erb-1.2.2 distribution.  

erb is not eruby:-)

BTW, I show a fragment of an eruby application.

This is used my webpage as my private bookmark.  Please visit it to see
how following code works(its written in Japanese, though:-)

http://www.duelists.org/~crouton/bookmark.rhtml (the page)
http://www.duelists.org/~crouton/bookmark.dtd (my bookmark DTD)
http://www.duelists.org/~crouton/bookmark.xml (bookmark itself)

# xml = ...(loaded from external XML file)
parser = XMLParser.new
$leaves = []
parser.parse(xml) do |event, name, data|
  case event
  when XMLParser::START_ELEM
    case name
    when 'bookmark'
%>
      <ul>
  <%when 'folder'%>
      <li><img width="23" height="19" border="0" alt="[-]" src="images/fol-o.png">
          <%=u8toeuc(data['title'])%>
          <ul>
  <%when 'site'
      $parent_site = data['href'].sub(/\/[^/]+$/, '/')%>
      <li><a href="<%=data['href']%>"><%=u8toeuc(data['title'])%></a>
  <%when 'leaf'
      $leaves.push data
    when 'separator'%>
      <hr style="display: block;">
  <%end%>
<%when XMLParser::END_ELEM
    case name
    when 'bookmark'%>
      </ul>
  <%when 'folder'%>
      </ul></li>
  <%when 'site'
      if $leaves.size > 0 then%>
        (<%=$leaves.collect{|l| %Q(<a href="#{$parent_site}#{l['href']}">#{u8toeuc(l['title'])}</a>) }.join(',')%>)
<%      $leaves = []
      end%>
      </li>
<%  end
  end
end%>

-- 
OZAWA -Crouton- Sakuro
E-Mail: mailto:crouton@duelists.org
        mailto:crouton@isoternet.org
   Web: http://www.duelists.org/~crouton/
   PGP: C98F 74E0 AEEB 4578 1DFC  F650 3BE0 9627 11FC C9F5

In This Thread