class WWWJDic::Parsers::Search

This class is an implementation of the Parsable duck type that checks the display type. The only needed parameter is the word to translate.

t is the search type:

(the old uxxxx format);

* S where the lookup text is in Shift-JIS;
* U where the lookup text is in UTF-8.

text string (e.g. kanji or reading) is in EUC;

* M for all lookups using a text string in UTF8;
* N for all lookups using a text string in Shift_JIS;
Author

Marco Bresciani

Copyright

© 2014-2021 Marco Bresciani

License

GNU General Public License version 3

Public Instance Methods

parse(value = '') click to toggle source

The parsable duck type interface to every parser usage.

   # File lib/wwwjdic/parsers/search.rb
60 def parse(value = '')
61   return 'D' if value == CGI.escape(value).to_s
62
63   'U'
64 end