Module: IrbBenchmark
- Defined in:
- lib/irb_benchmark.rb
Overview
Main IrbBenchmark module, which has to be injected into IRB::Context.
Constant Summary collapse
- VERSION =
File.read(File.('../../VERSION', __FILE__)).chomp.freeze
Class Attribute Summary collapse
-
.enabled ⇒ Object
Returns the value of attribute enabled.
Class Method Summary collapse
Class Attribute Details
.enabled ⇒ Object
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/irb_benchmark.rb', line 8 def enabled @enabled end |
Class Method Details
.print(bm) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/irb_benchmark.rb', line 10 def print(bm) if defined?(Wirb) && (!defined?(FancyIrb) || FancyIrb[:colorize, :output]) $stdout.print Wirb.colorize_result bm.to_s else $stdout.print bm.to_s end end |