Method: PhotoUtils::Length#format_metric
- Defined in:
- lib/photo_utils/length.rb
#format_metric(precision = nil) ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/photo_utils/length.rb', line 61 def format_metric(precision=nil) if self >= 1000 "#{(self / 1000).format(precision)}m" else "#{format(precision)}mm" end end |