Class: Kramdown::Utils::Entities::Entity
- Inherits:
-
Struct
- Object
- Struct
- Kramdown::Utils::Entities::Entity
- Defined in:
- lib/kramdown/utils/entities.rb
Overview
Represents an entity that has a code_point
and name
.
Instance Attribute Summary collapse
-
#code_point ⇒ Object
Returns the value of attribute code_point.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#char ⇒ Object
Return the UTF8 representation of the entity.
Instance Attribute Details
#code_point ⇒ Object
Returns the value of attribute code_point
31 32 33 |
# File 'lib/kramdown/utils/entities.rb', line 31 def code_point @code_point end |
#name ⇒ Object
Returns the value of attribute name
31 32 33 |
# File 'lib/kramdown/utils/entities.rb', line 31 def name @name end |
Instance Method Details
#char ⇒ Object
Return the UTF8 representation of the entity.
34 35 36 |
# File 'lib/kramdown/utils/entities.rb', line 34 def char [code_point].pack('U*') rescue nil end |