Class: SpeedtestNet::Formatter::Distance
- Inherits:
-
Object
- Object
- SpeedtestNet::Formatter::Distance
- Defined in:
- lib/speedtest_net/formatter/distance.rb
Class Method Summary collapse
Class Method Details
.call(distance) ⇒ Object
7 8 9 |
# File 'lib/speedtest_net/formatter/distance.rb', line 7 def call(distance) format('%<distance>.3f kilometre', distance: (distance / 1_000).round(3)) end |