Class: Object::String
- Inherits:
-
Object
- Object
- Object::String
- Defined in:
- lib/rwin.rb
Overview
RWin::API
Instance Method Summary collapse
-
#__hex__ ⇒ Object
Monkey patch of numeric conversion in an incompatible encoing.
- #__to_c__ ⇒ Object
- #__to_f__ ⇒ Object
- #__to_i__ ⇒ Object
- #hex ⇒ Object
- #to_c ⇒ Object
- #to_f ⇒ Object
- #to_i(base = 10) ⇒ Object
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 |
#hex ⇒ Object
707 708 709 |
# File 'lib/rwin.rb', line 707 def hex() encoding.ascii_compatible? ? __hex__ : encode(Encoding::UTF_8).__hex__ end |
#to_c ⇒ Object
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_f ⇒ Object
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 |