Module: GemfileArranger::Testing
- Defined in:
- lib/gemfile_arranger/testing.rb
Instance Method Summary collapse
-
#contents_to_ast(contents) ⇒ Object
NOTE: Too slow(140X slower).
Instance Method Details
#contents_to_ast(contents) ⇒ Object
NOTE: Too slow(140X slower).
ast: 0.00487 seconds
contents: 0.678528 seconds
6 7 8 9 10 11 |
# File 'lib/gemfile_arranger/testing.rb', line 6 def contents_to_ast(contents) buffer = Parser::Source::Buffer.new('(contents_to_ast)') buffer.source = contents parser = Parser::CurrentRuby.new parser.parse(buffer) end |