Class: MinitestSpecConverter::Converter
- Inherits:
-
Object
- Object
- MinitestSpecConverter::Converter
- Defined in:
- lib/minitest_spec_converter/converter.rb
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(file) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(file) ⇒ Converter
Returns a new instance of Converter.
7 8 9 |
# File 'lib/minitest_spec_converter/converter.rb', line 7 def initialize(file) @file = file end |
Instance Method Details
#convert ⇒ Object
11 12 13 14 15 16 |
# File 'lib/minitest_spec_converter/converter.rb', line 11 def convert content = File.read(@file) converted_content = convert_content(content) File.write(@file, converted_content) puts "Converted: #{@file}" end |