Ruby help needed

Added by Herve MORILLON over 9 years ago

Hello,

I would like to add a simple macro to add progression table in wiki pages; the issue is I don't know anything about ruby ;( I was able to add simple macro to put static html text but I don't know how to handle argument.
What I want to do is a macro(percent) that issue following html code:

<table class="progress" style="width: 80px;"><tr><td class="closed" width=" #arg %;"></td><td class="todo" width=" 100-#arg %;"></td></tr></table>

I know it is probably obvious for you guys, but can anyone help ?

BTW: man ruby or ruby for dummies will probably doesn't help me for a start ;)

Thank you

Replies (1)

RE: Ruby help needed - Added by Herve MORILLON over 9 years ago

I realized that there is already existing function progress_bar() to do the job. I'm now just missing the way to pass the argument.

I tried unsuccessfully

progress_bar(args.first)

where as

progress(20)

works as expected

What is the correct syntax ?

TIA,

(1-1/1)