Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Defined in:
- lib/gorp/commands.rb
Instance Method Summary collapse
Instance Method Details
#xchr(escape = true) ⇒ Object
286 287 288 289 290 291 292 293 294 295 |
# File 'lib/gorp/commands.rb', line 286 def xchr(escape=true) n = XChar::CP1252[self] || self case n when 0x9, 0xA, 0xD, (0x20..0xD7FF), (0xE000..0xFFFD), (0x10000..0x10FFFF) XChar::PREDEFINED[n] or (n<128 ? n.chr : (escape ? "&##{n};" : [n].pack('U*'))) else '*' end end |