Class: Minitest::Hyper::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/hyper/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reporter) ⇒ Report

Returns a new instance of Report.



9
10
11
# File 'lib/minitest/hyper/report.rb', line 9

def initialize(reporter)
  @reporter = reporter
end

Instance Attribute Details

#reporterObject (readonly)

Returns the value of attribute reporter.



7
8
9
# File 'lib/minitest/hyper/report.rb', line 7

def reporter
  @reporter
end

Instance Method Details

#dirnameObject



23
24
25
# File 'lib/minitest/hyper/report.rb', line 23

def dirname
  Minitest::Hyper.report_dirname
end

#filenameObject



27
28
29
# File 'lib/minitest/hyper/report.rb', line 27

def filename
  Minitest::Hyper.report_filename
end

#urlObject



19
20
21
# File 'lib/minitest/hyper/report.rb', line 19

def url
  "file://#{ filename.gsub(/\\/, "/") }"
end

#writeObject



13
14
15
16
17
# File 'lib/minitest/hyper/report.rb', line 13

def write
  ensure_output_dir
  move_existing_file
  write_file
end