Class: Transer::CLI
- Inherits:
-
Thor
- Object
- Thor
- Transer::CLI
- Defined in:
- lib/transer/cli.rb
Instance Method Summary collapse
Instance Method Details
#dic ⇒ Object
17 18 19 |
# File 'lib/transer/cli.rb', line 17 def dic usage() end |
#ej(*word) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/transer/cli.rb', line 27 def ej(*word) sentence = "" word.each do |w| sentence += "+" + w end search(sentence, 'english', 'japanese', 'EJdict') end |
#je(word) ⇒ Object
22 23 24 |
# File 'lib/transer/cli.rb', line 22 def je(word) search(word, 'japanese', 'english', 'EdictJE') end |
#trans(*word) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/transer/cli.rb', line 38 def trans(*word) if [:ej] sentence = [:ej] word.each do |w| sentence += "+" + w end trans_word(sentence, 'en', 'ja') elsif [:je] trans_word([:je], 'ja', 'en') else usage() end end |