Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_hex/string.rb

Instance Method Summary collapse

Instance Method Details

#decObject

Treats leading characters from str as a string of decimal digits (with an optional sign) and returns the corresponding number. Zero is returned on error.



21
22
23
# File 'lib/ruby_hex/string.rb', line 21

def dec
  to_i(0xa)
end

#to_i(base = 0x10) ⇒ Object



14
15
16
# File 'lib/ruby_hex/string.rb', line 14

def to_i(base = 0x10)
  _origin_to_i(base)
end