Tuesday, 20 August 2013

Ruby: How to execute part of codes from loaded file

Ruby: How to execute part of codes from loaded file

I have very specific situation
I have separated file with json entries:
{
"field": "value",
"field2": "#{Time.now + (24*60*60)).to_i.to_s}"
}
after I load this content using IO.read(file) I want to execute code
inside with date defined in that value
how to do this?

No comments:

Post a Comment