class String

Private Class Methods

_origin(name) click to toggle source
# File lib/ruby_hex/string.rb, line 2
def self._origin(name)
  alias_method "_origin_#{name}", name
end

Public Instance Methods

dec() click to toggle source

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.

# File lib/ruby_hex/string.rb, line 21
def dec
  to_i(0xa)
end
to_i(base = 0x10) click to toggle source
# File lib/ruby_hex/string.rb, line 14
def to_i(base = 0x10)
  _origin_to_i(base)
end