class Kramdown::Utils::Entities::Entity

Represents an entity that has a code_point and name.

Public Instance Methods

char() click to toggle source

Return the UTF8 representation of the entity.

# File lib/monkey_patches/kramdown/utils/entities.rb, line 12
def char
  if code_point.instance_of?(Array)
    [*code_point].pack('U*') rescue nil
  else
    [code_point].pack('U*') rescue nil
  end
end