class Irc::Bot::Config::FloatValue

Public Instance Methods

parse(string) click to toggle source
# File lib/rbot/config.rb, line 159
def parse(string)
  raise ArgumentError, "not a float #{string}" unless string =~ /^-?[\d.]+$/
  string.to_f
end