class UnicodeUtils::NameAlias
Attributes
name[R]
The alias as string.
type[R]
The type of alias as symbol. Currently one of :correction, :control, :alternate, :figment, :abbreviation.
Public Class Methods
new(name, type)
click to toggle source
Do not construct directly. Use UnicodeUtils.name_aliases
.
# File lib/unicode_utils/name_alias.rb, line 15 def initialize(name, type) @name = name @type = type end
Public Instance Methods
==(other)
click to toggle source
# File lib/unicode_utils/name_alias.rb, line 31 def ==(other) other.kind_of?(NameAlias) && other.type == type && other.name == name end
eql?(other)
click to toggle source
# File lib/unicode_utils/name_alias.rb, line 35 def eql?(other) self == other end
hash()
click to toggle source
# File lib/unicode_utils/name_alias.rb, line 39 def hash name.hash end
inspect()
click to toggle source
Returns a descriptive string. The format may change even in minor releases.
# File lib/unicode_utils/name_alias.rb, line 22 def inspect "#<UnicodeUtils::NameAlias #{name} #{type.inspect}>" end
to_s()
click to toggle source
Returns name.
# File lib/unicode_utils/name_alias.rb, line 27 def to_s name end