Module: BoringAvatars::Svg::Value
- Defined in:
- lib/boring_avatars/svg/value.rb
Class Method Summary collapse
Class Method Details
.number(value) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/boring_avatars/svg/value.rb', line 8 def number(value) return "0" if value.zero? return value.to_i.to_s if value.is_a?(Float) && value.finite? && value == value.to_i value.to_s end |