Class: Interscript::Command

Inherits:
Thor
  • Object
show all
Defined in:
lib/interscript/command.rb

Overview

Command line interface

Instance Method Summary collapse

Instance Method Details

#listObject



20
21
22
23
24
25
# File 'lib/interscript/command.rb', line 20

def list
  dir = File.expand_path '../../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 options[:output]
    Interscript.transliterate_file(options[:system], input, options[:output])
  else
    puts Interscript.transliterate(options[:system], IO.read(input))
  end
end