Class: WenlinDbScanner::CharMeaning
- Inherits:
-
Struct
- Object
- Struct
- WenlinDbScanner::CharMeaning
- Defined in:
- lib/wenlin_db_scanner/chars.rb
Overview
Wraps a record in a dictionary database
Instance Attribute Summary collapse
-
#cantonese ⇒ Array<String>
Character’s pronunciation in Cantonese.
-
#char ⇒ String
1-character string containing the defined character.
-
#complex_forms ⇒ Array<String>
This character is a simplified variant of them.
-
#components ⇒ Array<String>
1-character strings with characters that are contained in this character’s image.
-
#latin_pinyin ⇒ Array<String>
Pinyin pronunciation(s) of the character, with with the accents removed; this is what users type to get the character.
-
#meaning ⇒ String
The character’s definition, in English.
-
#note ⇒ String
E.g., “same as X” or.
-
#pinyin ⇒ Array<String>
Pinyin pronunciation(s) of the character.
-
#related ⇒ Array<String>
Characters that are somehow related.
-
#simplified_forms ⇒ Array<String>
Simplified variants of the character.
-
#variants ⇒ Array<String>
Other variants of the character.
Instance Method Summary collapse
Instance Attribute Details
#cantonese ⇒ Array<String>
Returns character’s pronunciation in Cantonese.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def cantonese @cantonese end |
#char ⇒ String
Returns 1-character string containing the defined character.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def char @char end |
#complex_forms ⇒ Array<String>
Returns this character is a simplified variant of them.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def complex_forms @complex_forms end |
#components ⇒ Array<String>
Returns 1-character strings with characters that are contained in this character’s image.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def components @components end |
#latin_pinyin ⇒ Array<String>
Returns pinyin pronunciation(s) of the character, with with the accents removed; this is what users type to get the character.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def @latin_pinyin end |
#meaning ⇒ String
Returns the character’s definition, in English.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def meaning @meaning end |
#note ⇒ String
Returns e.g., “same as X” or.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def note @note end |
#pinyin ⇒ Array<String>
Returns pinyin pronunciation(s) of the character.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def @pinyin end |
#related ⇒ Array<String>
Returns characters that are somehow related.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def @related end |
#simplified_forms ⇒ Array<String>
Returns simplified variants of the character.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def simplified_forms @simplified_forms end |
#variants ⇒ Array<String>
Returns other variants of the character.
179 180 181 |
# File 'lib/wenlin_db_scanner/chars.rb', line 179 def variants @variants end |
Instance Method Details
#to_hash ⇒ Hash
210 211 212 |
# File 'lib/wenlin_db_scanner/chars.rb', line 210 def to_hash Hash[each_pair.reject { |k, v| v.nil? }.to_a] end |