Class: DomGlancy::PageMapper
- Inherits:
-
Object
- Object
- DomGlancy::PageMapper
- Defined in:
- lib/dom_glancy/page_mapper.rb
Instance Method Summary collapse
Instance Method Details
#run(test_root) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/dom_glancy/page_mapper.rb', line 4 def run(test_root) filename = ::DomGlancy::FileNameBuilder.new(test_root).current result = [true, ''] begin data = map_page.to_yaml File.open(filename, 'w') { |file| file.write(data) } rescue Exception => e result = [false, "map current file error: #{e.}"] end result end |