Sha256: 51f7a9e3540bf5c56c893c19e523663fd185c0600dfe3eba00502130357f8185

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

require 'radix/meta/data'
require 'radix/base'
require 'radix/integer'
require 'radix/float'
require 'radix/rational'  # load ?

class ::Float
  #
  def b(base)
    Radix::Float.new(self, base)
  end
end

class ::Integer
  #
  def b(base)
    Radix::Integer.new(self, base)
  end
end

class ::String
  #
  def b(base)
    if index('.')
      Radix::Float.new(self, base)
    else
      Radix::Integer.new(self, base)
    end
  end
end

class ::Array
  #
  def b(base)
    if index('.')
      Radix::Float.new(self, base)
    else
      Radix::Integer.new(self, base)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
radix-2.0.0 lib/radix.rb