Class: Ucode::Parsers::Unihan::Record

Inherits:
Struct
  • Object
show all
Defined in:
lib/ucode/parsers/unihan.rb

Overview

Stream record: one Unihan line. Internal pipeline data — a Struct avoids lutaml-model ceremony for transient values. The final ‘UnihanEntry` model carries the merged, persisted shape. The member is `field_values` (not `values`) to avoid overriding `Struct#values` (the array of all member values).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cpObject

Returns the value of attribute cp

Returns:

  • (Object)

    the current value of cp



45
46
47
# File 'lib/ucode/parsers/unihan.rb', line 45

def cp
  @cp
end

#fieldObject

Returns the value of attribute field

Returns:

  • (Object)

    the current value of field



45
46
47
# File 'lib/ucode/parsers/unihan.rb', line 45

def field
  @field
end

#field_valuesObject

Returns the value of attribute field_values

Returns:

  • (Object)

    the current value of field_values



45
46
47
# File 'lib/ucode/parsers/unihan.rb', line 45

def field_values
  @field_values
end

Instance Method Details

#cp_idObject



46
47
48
# File 'lib/ucode/parsers/unihan.rb', line 46

def cp_id
  format("U+%04X", cp)
end