Sha256: 875fd0c7add7d79d6fa199a008f699503201429b54c682fe4de45c3028e7cff1
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
require "thor" require_relative 'local_history' require_relative 'version' require_relative 'openai/gpt.rb' module GeekDict class CLI < Thor desc "t", "Translate a word" option :debug, :aliases=>'-d', :type=>:boolean,:default=>false option :open, :aliases => '-o', :type => :boolean, :default=> false def t(word) GeekDict.debugger options[:debug] LocalHistory.save word result = GeekDict::OpenAI.translate word puts result end desc "v", "version" def v() puts GeekDict::VERSION end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
geekdict-0.1.1 | lib/geekdict/cli.rb |
geekdict-0.1.0 | lib/geekdict/cli.rb |