Module: JishoSort::Comparable
- Included in:
- String
- Defined in:
- lib/jisho_sort/comparable.rb
Instance Method Summary collapse
-
#compare_by_furigana(other) ⇒ Integer
Compares the current string include chines and japanese character with another string based on their japanese pronunciation(furigana).
Instance Method Details
#compare_by_furigana(other) ⇒ Integer
Compares the current string include chines and japanese character with another string based on their japanese pronunciation(furigana).
7 8 9 10 11 |
# File 'lib/jisho_sort/comparable.rb', line 7 def compare_by_furigana(other) raise ArgumentError unless other.instance_of?(String) furigana <=> other.furigana end |