Parent

Methods

Forgery::Extensions::Range

Public Instance Methods

random() click to toggle source
# File lib/forgery/extensions/range.rb, line 9
def random
  Integer(first) && Integer(last)
  raise ArgumentError if first > last
  Kernel.rand(last - first + (exclude_end? ? 0 : 1)) + first
rescue ArgumentError
  Forgery::Extend(to_a).random
end
unextend() click to toggle source
# File lib/forgery/extensions/range.rb, line 5
def unextend
  ::Range.new(first, last, exclude_end?)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.