module Charty::Plotters::RandomSupport

Attributes

random[R]

Public Instance Methods

check_random(random) click to toggle source
# File lib/charty/plotters/random_support.rb, line 10
                def check_random(random)
  case random
  when nil
    Random.new
  when Integer
    Random.new(random)
  when Random
    random
  else
    raise ArgumentError,
          "invalid value for random (%p for a generator or a seed value)" % value
  end
end
random=(random) click to toggle source
# File lib/charty/plotters/random_support.rb, line 6
def random=(random)
  @random = check_random(random)
end