Sha256: 1a3aea71c3ce4e054b70b3da01d1815704c0a0f6d665889f168a9d6076c66759

Contents?: true

Size: 787 Bytes

Versions: 1

Compression:

Stored size: 787 Bytes

Contents

# coding: utf-8

#==============================================================================#
# $Id: rand.rb 120 2009-02-09 08:22:25Z yuyakato $
#==============================================================================#

require File.join(File.dirname(__FILE__), "core")

#==============================================================================#

class Kagemusha #:nodoc:
  module Rand
    def self.always(num, &block)
      if block_given?
        return self.always(num).swap(&block)
      end

      musha = Kagemusha.new(Kernel)
      musha.def(:rand) { |*x| num }

      return musha
    end
  end
end

#==============================================================================#
#==============================================================================#

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kagemusha-0.0.8 lib/kagemusha/rand.rb