Class: UyirMeiLoader
- Inherits:
-
Object
- Object
- UyirMeiLoader
- Defined in:
- lib/uyirmei.rb
Constant Summary collapse
- CORE_FILE =
File.join(File.dirname(__FILE__), '/uyirmei/core.rb')
- SRC =
'runner.rb'
Class Method Summary collapse
Class Method Details
.execute(file) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/uyirmei.rb', line 13 def execute(file) File.open(SRC,"w") { |f| f.puts [CORE_FILE, file].map{ |s| IO.read(s) }} replace(SRC, 'பின்கொடு', 'return') require "./#{SRC}" File.delete(SRC) end |
.replace(file, word, with) ⇒ Object
9 10 11 |
# File 'lib/uyirmei.rb', line 9 def replace(file, word, with) File.write(file,File.open(file,&:read).gsub(word,with)) end |