Class: Irc::Bot::Config::FloatValue
Instance Attribute Summary
Attributes inherited from Value
#auth_path, #desc, #key, #manager, #order, #requires_rescan, #requires_restart, #type, #wizard
Instance Method Summary collapse
Methods inherited from Value
#default, #get, #initialize, #set, #set_string, #to_s, #unset
Constructor Details
This class inherits a constructor from Irc::Bot::Config::Value
Instance Method Details
#parse(string) ⇒ Object
159 160 161 162 |
# File 'lib/rbot/config.rb', line 159 def parse(string) raise ArgumentError, "not a float #{string}" unless string =~ /^-?[\d.]+$/ string.to_f end |