Class: Romajic::CLI
- Inherits:
-
Thor
- Object
- Thor
- Romajic::CLI
- Defined in:
- lib/romajic/cli.rb
Overview
Command-line interface of Romajic
Instance Method Summary collapse
-
#search(word = nil) ⇒ Object
Search romaji in the source files.
-
#version ⇒ Object
Print the version.
Instance Method Details
#search(word = nil) ⇒ Object
Search romaji in the source files
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/romajic/cli.rb', line 20 def search(word = nil) = {} [:word] = word if word [:exclude_word] = [:exclude_word] if [:exclude_word] if [:config] [:config] = File.([:config]) else [:config] = File.('../../../default.yml', __FILE__) end [:dir] = [:dir] if [:dir] [:extensions] = [:extensions] if [:extensions] [:distance] = [:distance] if [:distance] [:converter] = [:converter] if [:converter] cop = Cop.new() cop.search end |