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
20 21 22 23 24 25 |
# File 'lib/interscript/command.rb', line 20 def list dir = File. '../../maps/*.yaml', __dir__ Dir[dir].each do |path| puts File.basename path, '.yaml' end end |
#translit(input) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/interscript/command.rb', line 11 def translit(input) if [:output] Interscript.transliterate_file([:system], input, [:output]) else puts Interscript.transliterate([:system], IO.read(input)) end end |