class String

Public Instance Methods

color_with_number(number) click to toggle source
# File lib/bitflyer/cli/ext/string.rb, line 4
def color_with_number(number)
  sign = number >= 0.0 ? '+' : ''
  sign + colorize(number >= 0.0 ? :green : :red)
end
split_by_comma() click to toggle source
# File lib/bitflyer/cli/ext/string.rb, line 9
def split_by_comma
  reverse.gsub( /(\d{3})(?=\d)/, '\1,').reverse
end