Class: Ucode::Parsers::Unihan::Record
- Inherits:
-
Struct
- Object
- Struct
- Ucode::Parsers::Unihan::Record
- 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).
category is the symbol UnihanEntry uses to bucket the field
into its category attribute (readings / variants / etc.). Set
by each_in_dir from the source filename via FILE_TO_CATEGORY.
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#cp ⇒ Object
Returns the value of attribute cp.
-
#field ⇒ Object
Returns the value of attribute field.
-
#field_values ⇒ Object
Returns the value of attribute field_values.
Instance Method Summary collapse
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category
65 66 67 |
# File 'lib/ucode/parsers/unihan.rb', line 65 def category @category end |
#cp ⇒ Object
Returns the value of attribute cp
65 66 67 |
# File 'lib/ucode/parsers/unihan.rb', line 65 def cp @cp end |
#field ⇒ Object
Returns the value of attribute field
65 66 67 |
# File 'lib/ucode/parsers/unihan.rb', line 65 def field @field end |
#field_values ⇒ Object
Returns the value of attribute field_values
65 66 67 |
# File 'lib/ucode/parsers/unihan.rb', line 65 def field_values @field_values end |
Instance Method Details
#cp_id ⇒ Object
66 67 68 |
# File 'lib/ucode/parsers/unihan.rb', line 66 def cp_id format("U+%04X", cp) end |