Hassan Schroeder wrote in post #1074693:
> On Tue, Sep 4, 2012 at 9:37 AM, Dave Castellano <li...@ruby-forum.com>
> wrote:
>
>> Tempfile.open(["hello_world", ".rb"], "./lib/generators") do |file|
>
>> If the file is a method, how can I call the method here and get the returned
>> arguments?
>
> The file can't "be" a method, but it may contain a string describing a
> method. You can read that string and invoke it using `eval`.
>
> See: http://www.ruby-doc.org/core-1.9.3/Kernel.html#method-i-eval
>
> HTH,
> --
> Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan

Sorry, meant the file contains a method...

Thanks for the help!!  I think that is what I was looking for.

DC

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to