class Irc::Bot::Config::IntegerValue
Public Instance Methods
Source
# File lib/rbot/config.rb, line 148 def get r = super if r.kind_of?(Integer) return r else return r ? 1 : 0 end end
Calls superclass method
Irc::Bot::Config::Value#get
Source
# File lib/rbot/config.rb, line 142 def parse(string) return 1 if string == "true" return 0 if string == "false" raise ArgumentError, "not an integer: #{string}" unless string =~ /^-?\d+$/ string.to_i end