Class: Ucode::CodeChart::GapAnalyzer::BlockGap

Inherits:
Struct
  • Object
show all
Defined in:
lib/ucode/code_chart/gap_analyzer/block_gap.rb

Overview

Typed per-block result: which block, which codepoints the manifest's donor sources DON'T cover, and the UCD version the manifest declared.

The unit of work BatchRunner iterates. Frozen on construction so callers can pass it around without worry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBlockGap

Returns a new instance of BlockGap.



18
19
20
21
# File 'lib/ucode/code_chart/gap_analyzer/block_gap.rb', line 18

def initialize(*)
  super
  self.missing_codepoints = Array(missing_codepoints).sort.freeze
end

Instance Attribute Details

#block_idObject

Returns the value of attribute block_id

Returns:

  • (Object)

    the current value of block_id



12
13
14
# File 'lib/ucode/code_chart/gap_analyzer/block_gap.rb', line 12

def block_id
  @block_id
end

#missing_codepointsObject

Returns the value of attribute missing_codepoints

Returns:

  • (Object)

    the current value of missing_codepoints



12
13
14
# File 'lib/ucode/code_chart/gap_analyzer/block_gap.rb', line 12

def missing_codepoints
  @missing_codepoints
end

#ucd_versionObject

Returns the value of attribute ucd_version

Returns:

  • (Object)

    the current value of ucd_version



12
13
14
# File 'lib/ucode/code_chart/gap_analyzer/block_gap.rb', line 12

def ucd_version
  @ucd_version
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/ucode/code_chart/gap_analyzer/block_gap.rb', line 29

def empty?
  missing_codepoints.empty?
end

#sizeInteger

Returns:

  • (Integer)


24
25
26
# File 'lib/ucode/code_chart/gap_analyzer/block_gap.rb', line 24

def size
  missing_codepoints.size
end