Class: Interscript::Command
- Inherits:
-
Thor
- Object
- Thor
- Interscript::Command
- Defined in:
- lib/interscript/command.rb
Overview
Command line interface
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
21 22 23 24 25 26 |
# File 'lib/interscript/command.rb', line 21 def list dir = File. '../../maps/*.yaml', __dir__ Dir[dir].each do |path| puts File.basename path, '.yaml' end end |
#translit(input) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/interscript/command.rb', line 12 def translit(input) if [:output] Interscript.transliterate_file([:system], input, [:output], JSON.parse([:map])) else puts Interscript.transliterate([:system], IO.read(input)) end end |