Class: Fixnum

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

Instance Method Summary collapse

Instance Method Details

#xchrObject

xml escaped version of chr



243
244
245
246
247
# File 'lib/rfeedparser/encoding_helpers.rb', line 243

def xchr
  n = XChar::CP1252[self] || self
  n = 42 unless XChar::VALID.find {|range| range.include? n}
  XChar::PREDEFINED[n] or (n<128 ? n.chr : "&##{n};")
end