From: matt_neuburg@... (Matt Neuburg) Date: 2009-09-07T01:50:06+09:00 Subject: Re: Opinion: Scripting in a Ruby program Tristan Shelton wrote: > Hello all, I'm working on a small program -- and learning to love Ruby > all over again -- but I've come across a small dilemma: What if you want > to make a Ruby program that can be extended without modifying the > original code? That is, a Ruby script that can itself be scripted. Well, of course I could be misunderstanding the question, but isn't that exactly what any Ruby-based Web framework is? What is Ruby on Rails, for instance, but a Ruby script that you do not modify directly, but which turns to you at predefined times and in predefined ways and says, "extend me here if you wish!" So it's just a question of supplying "hooks" and documenting them: here's when I'll turn to you, and here's what you do and where you put your code in order for me to find it. (I use Ruby on Rails as an example because it is well known, but in fact the example that occurred to me when you asked this question was my own RubyFrontier, a much smaller, simpler Web framework, because that is exactly its philosophy and architecture.) m.