class TxNlp::CLI

Public Class Methods

source_root() click to toggle source
# File lib/tx_nlp/cli.rb, line 9
def self.source_root
  File.expand_path('../..', __dir__)
end

Public Instance Methods

config() click to toggle source
# File lib/tx_nlp/cli.rb, line 14
def config

  config_path = Dir.home + '/.tx_nlp'
  if Dir.exist?(config_path)
    puts "Your current name is [#{TxNlp.config[:name]}]."
  else
    template 'templates/settings.yml.tt', "http://#{config_path}/settings.yml"
  end
end
keyword(keyword) click to toggle source
# File lib/tx_nlp/cli.rb, line 31
def keyword(keyword)
  puts TxNlp::Keyword.new(keyword).indent_result
end
word(word) click to toggle source
# File lib/tx_nlp/cli.rb, line 26
def word(word)
  puts TxNlp::Text.new(word).indent_result
end

Private Instance Methods

display_name(name) click to toggle source
# File lib/tx_nlp/cli.rb, line 37
def display_name(name)
  puts name
end