Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/unisec/utils.rb
Instance Method Summary collapse
-
#to_bin ⇒ String
Convert an integer to an binary string.
-
#to_hex ⇒ String
Convert an integer to an hexadecimal string.
Instance Method Details
#to_bin ⇒ String
Convert an integer to an binary string
18 19 20 |
# File 'lib/unisec/utils.rb', line 18 def to_bin to_s(2) end |
#to_hex ⇒ String
Convert an integer to an hexadecimal string
10 11 12 |
# File 'lib/unisec/utils.rb', line 10 def to_hex to_s(16).upcase end |