Module: RSpecTelemetry::ConsoleReport::Helpers
- Included in:
- RSpecTelemetry::ConsoleReport
- Defined in:
- lib/rspec_telemetry/console_report.rb
Class Method Summary collapse
Class Method Details
.fmt(ms) ⇒ Object
10 |
# File 'lib/rspec_telemetry/console_report.rb', line 10 def fmt(ms) = Formatting.duration(ms) |
.pct(ratio) ⇒ Object
12 |
# File 'lib/rspec_telemetry/console_report.rb', line 12 def pct(ratio) = Formatting.percent(ratio * 100) |
.section(title) ⇒ Object
16 |
# File 'lib/rspec_telemetry/console_report.rb', line 16 def section(title) = ["", title, "-" * title.length] |
.truncate(str, len) ⇒ Object
14 |
# File 'lib/rspec_telemetry/console_report.rb', line 14 def truncate(str, len) = str.length > len ? "#{str[0, len - 1]}…" : str |