Method: Array#b

Defined in:
lib/radix/operator.rb

#b(base) ⇒ Radix::Integer, Radix::Float

Takes array and makes it into a Radix::Integer or Radix::Float as given base. Float is determined by a “.” character in array instance.

Parameters:

Returns:



86
87
88
89
90
91
92
# File 'lib/radix/operator.rb', line 86

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