[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

A code generator?

Pedro Del Gallego

2/28/2007 2:41:00 AM

Hi,
I am in a not rails project. I want to generate some struct-dumb-code
in ruby that is going to be heavily changed. Right now, i did it using
rails script/generate.

My question is, is out there any good code-generator for ruby ?

Is there a good way to use the rails generator to build out-rails-code?

BTW we are thinking in create a house-code-generator. Any good
article/video on this topic

Thanx

PS: I think i made double posting everytime a mail to the list bur i
dont know why :( Sorry for that
--
-------------------------------------
Pedro Del Gallego

Email : pedro.delgallego@gmail.com

3 Answers

Harry

2/28/2007 3:40:00 AM

0

> PS: I think i made double posting everytime a mail to the list bur i
> dont know why :( Sorry for that
> --
> -------------------------------------
> Pedro Del Gallego

Double posting?

http://www.ruby-forum.com/topic/...

Harry
--
http://www.kakueki.com/ruby...

Mat Schaffer

2/28/2007 3:42:00 AM

0

On Feb 27, 2007, at 9:41 PM, Pedro Del Gallego wrote:
> Hi,
> I am in a not rails project. I want to generate some struct-dumb-code
> in ruby that is going to be heavily changed. Right now, i did it using
> rails script/generate.
>
> My question is, is out there any good code-generator for ruby ?
>
> Is there a good way to use the rails generator to build out-rails-
> code?
>
> BTW we are thinking in create a house-code-generator. Any good
> article/video on this topic

First, how about creating an in-house gem rather than code
generation? If generated code has bugs, fixing it can be a pain.

But if you think it's the best solution I recommend erb, which is
what the rails generations are based on.

Hope that helps!
Mat

Erik Veenstra

3/1/2007 9:05:00 AM

0

> My question is, is out there any good code-generator for ruby
> ?

Ruby itself is a good code-generator for Ruby...

Search on Google for "ruby meta programming".

gegroet,
Erik V. - http://www.erikve...