Skip to content

Commit

Permalink
replace def_erb_method.
Browse files Browse the repository at this point in the history
  • Loading branch information
babie committed Jan 20, 2009
1 parent 36d2fc1 commit 339ffef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generators/i18n_translation/lib/erb_executer.rb
Expand Up @@ -15,7 +15,10 @@ class Executer
def method_missing(method, *args, &block); nil; end
end
def_erb_method 'execute', '#{filename}'
fname = '#{filename}'
erb = nil
File.open(fname) {|f| erb = ERB.new(f.read, nil, '-') }
erb.def_method(self, 'execute', fname)
end
EOS
m.const_get('Executer').new.execute { }
Expand Down

0 comments on commit 339ffef

Please sign in to comment.