Class: MorseCode::Decoders::Chinese
- Defined in:
- lib/morse_code/decoders/chinese.rb
Constant Summary collapse
- MIN_CHINESE_CODEPOINT =
u4e00
19_968
- MAX_CHINESE_CODEPOINT =
u9fa5
40_869
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
inherited, #initialize, #supported_class, #supported_classes
Constructor Details
This class inherits a constructor from MorseCode::Base
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/morse_code/decoders/chinese.rb', line 16 def call decode_binary_word.chr('UTF-8') end |
#supported? ⇒ Boolean
12 13 14 |
# File 'lib/morse_code/decoders/chinese.rb', line 12 def supported? decode_binary_word >= MIN_CHINESE_CODEPOINT && decode_binary_word <= MAX_CHINESE_CODEPOINT end |