Class: Object::String

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

Overview

RWin::API

Instance Method Summary collapse

Instance Method Details

#__hex__Object

Monkey patch of numeric conversion in an incompatible encoing. This extension must be use the refinements.



702
# File 'lib/rwin.rb', line 702

alias :__hex__  :hex

#__to_c__Object



703
# File 'lib/rwin.rb', line 703

alias :__to_c__ :to_c

#__to_f__Object



704
# File 'lib/rwin.rb', line 704

alias :__to_f__ :to_f

#__to_i__Object



705
# File 'lib/rwin.rb', line 705

alias :__to_i__ :to_i

#hexObject



707
708
709
# File 'lib/rwin.rb', line 707

def hex()
  encoding.ascii_compatible? ? __hex__ : encode(Encoding::UTF_8).__hex__
end

#to_cObject



710
711
712
# File 'lib/rwin.rb', line 710

def to_c()
  encoding.ascii_compatible? ? __to_c__ : encode(Encoding::UTF_8).__to_c__
end

#to_fObject



713
714
715
# File 'lib/rwin.rb', line 713

def to_f()
  encoding.ascii_compatible? ? __to_f__ : encode(Encoding::UTF_8).__to_f__
end

#to_i(base = 10) ⇒ Object



716
717
718
# File 'lib/rwin.rb', line 716

def to_i(base = 10)
  encoding.ascii_compatible? ? __to_i__(base) : encode(Encoding::UTF_8).__to_i__(base)
end