Sha256: 4ca794a5b57427e4bd6a46c9bd727487d206b269dd8c5b453e72c98343be600b
Contents?: true
Size: 577 Bytes
Versions: 1
Compression:
Stored size: 577 Bytes
Contents
require: "../number" class Fixnum { """ Standard class for integer values in Fancy. """ include: Number ruby_aliases: [ '==, '-, '+, '*, '/, '<, '>, '<=, '>=, '===, 'chr, 'to_i, 'to_f, '**, '&, '|, '<<, '>> ] alias_method: 'to_s: for: 'to_s alias_method: 'modulo: for: 'modulo alias_method: ":%" for: "modulo:" # use a : so we dont overwrite ruby's % operator alias_method: 'div: for: 'div def random { """ @return Random number between 0 and @self. Returns a random number between 0 and @self. """ rand(self) } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fancy-0.6.0 | lib/rbx/fixnum.fy |