A
anne001
I am using ruby and eruby to learn web programming
The web exercise I am working on aggregates information from several
data sources. The default computation is presented on the main rhtml
page. I use eruby and open-uri to open the various html data sources
and regular expressions to extract the info, I can then process the
data and present it on the main rhtml page.
But I don't know how to create a link to offer an alternative
computation.
I would like 127.0.0.1/erubyfiles/pgm.rhtml to call the default
computation
and to have an embeded relative link "/alt1" on that page which calls
the alternative computation, with the code for that alternative
computation in the same pgm.rhtml file.
in the original example for AOL associating a relative link and code is
done with
ad_register_proc GET /alt1 pgm_alt1
where pgm_alt1 is a procedure.
how is this done in eruby? I will need to have methods, which means I
need to have an explicit class. then how do I associate a relative link
to one of the class method?
The web exercise I am working on aggregates information from several
data sources. The default computation is presented on the main rhtml
page. I use eruby and open-uri to open the various html data sources
and regular expressions to extract the info, I can then process the
data and present it on the main rhtml page.
But I don't know how to create a link to offer an alternative
computation.
I would like 127.0.0.1/erubyfiles/pgm.rhtml to call the default
computation
and to have an embeded relative link "/alt1" on that page which calls
the alternative computation, with the code for that alternative
computation in the same pgm.rhtml file.
in the original example for AOL associating a relative link and code is
done with
ad_register_proc GET /alt1 pgm_alt1
where pgm_alt1 is a procedure.
how is this done in eruby? I will need to have methods, which means I
need to have an explicit class. then how do I associate a relative link
to one of the class method?