Class Range
In: lib/rbot/core/utils/extends.rb
Parent: Object
User HTTPResponse BasicUserMessage Bot\n[lib/rbot/core/remote.rb\nlib/rbot/core/utils/extends.rb\nlib/rbot/core/utils/filters.rb\nlib/rbot/core/utils/wordlist.rb] HttpUtil Array Module Numeric Range String\n[lib/rbot/botuser.rb\nlib/rbot/core/utils/extends.rb\nlib/rbot/irc.rb\nlib/rbot/ircsocket.rb\nlib/rbot/load-gettext.rb] Regexp\n[lib/rbot/core/utils/extends.rb\nlib/rbot/irc.rb\nlib/rbot/messagemapper.rb] lib/rbot/core/userdata.rb lib/rbot/core/utils/httputil.rb lib/rbot/core/utils/extends.rb lib/rbot/core/remote.rb lib/rbot/core/utils/httputil.rb ParseTime Utils (null) dot/f_13.png

Extensions to the Range class

Methods

pick_one   rand  

Public Instance methods

This method returns a random number between the lower and upper bound

[Source]

     # File lib/rbot/core/utils/extends.rb, line 179
179:   def pick_one
180:     len = self.last - self.first
181:     len += 1 unless self.exclude_end?
182:     self.first + Kernel::rand(len)
183:   end
rand()

Alias for pick_one

[Validate]