Class: Rails5XHRUpdate::Cli
- Inherits:
-
Object
- Object
- Rails5XHRUpdate::Cli
- Defined in:
- lib/rails5_xhr_update/cli.rb
Overview
Provide the entry point to this program.
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails5_xhr_update/cli.rb', line 8 def run filenames.each do |path| buffer = Parser::Source::Buffer.new(path) buffer.read new_source = XHRToRails5.new.rewrite( buffer, Parser::CurrentRuby.new.parse(buffer) ) output(new_source, path) end 0 end |