class Yiban::CLI

Public Class Methods

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

Public Instance Methods

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

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

Private Instance Methods

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