Class: Ucode::Unicode::Plane

Inherits:
Struct
  • Object
show all
Defined in:
lib/ucode/unicode/plane.rb

Overview

A Unicode plane — a contiguous range of 65_536 codepoints. There are 17 planes (0–16). Only 7 have official short names.

Pure value object: carries data, nothing else. Not a lutaml-model (those are serialization DTOs). Constructed frozen by Catalog.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#assigned_countObject

Returns the value of attribute assigned_count

Returns:

  • (Object)

    the current value of assigned_count



10
11
12
# File 'lib/ucode/unicode/plane.rb', line 10

def assigned_count
  @assigned_count
end

#display_nameObject

Returns the value of attribute display_name

Returns:

  • (Object)

    the current value of display_name



10
11
12
# File 'lib/ucode/unicode/plane.rb', line 10

def display_name
  @display_name
end

#numberObject

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



10
11
12
# File 'lib/ucode/unicode/plane.rb', line 10

def number
  @number
end

#rangeObject

Returns the value of attribute range

Returns:

  • (Object)

    the current value of range



10
11
12
# File 'lib/ucode/unicode/plane.rb', line 10

def range
  @range
end

#short_nameObject

Returns the value of attribute short_name

Returns:

  • (Object)

    the current value of short_name



10
11
12
# File 'lib/ucode/unicode/plane.rb', line 10

def short_name
  @short_name
end

Instance Method Details

#cover?(codepoint) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ucode/unicode/plane.rb', line 18

def cover?(codepoint)
  range.cover?(codepoint)
end