Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/bases/monkeypatches/array.rb

Overview

Some monkeypatches to the Array class.

Instance Method Summary collapse

Instance Method Details

#in_base(base) ⇒ Number

Return a Bases::Number instance with the current array as the value and the source base set to base.

Parameters:

Returns:

  • (Number)

See Also:



10
11
12
# File 'lib/bases/monkeypatches/array.rb', line 10

def in_base(base)
  Bases.val(self).in_base(base)
end

#in_binaryNumber

Return a Bases::Number instance with the current array as the value and the source base set to the binary base.

Returns:

  • (Number)

See Also:



18
19
20
# File 'lib/bases/monkeypatches/array.rb', line 18

def in_binary
  Bases.val(self).in_binary
end

#in_hexNumber

Return a Bases::Number instance with the current array as the value and the source base set to the hexadecimale base.

Returns:

  • (Number)

See Also:



26
27
28
# File 'lib/bases/monkeypatches/array.rb', line 26

def in_hex
  Bases.val(self).in_hex
end