Sha256: f81654b9eee75a32948f25b58172389197fef1b1f7b0d3f9b9280803988cef15

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env ruby
require 'thor'
require 'my_help'

class MyCLI < Thor
  desc "list", "list all helps, specific HELP, or item"
  def list(*args)
    $control = MyHelp::Control.new()
    file = args[0]
    item = args[1]
    if file.nil?
      $control.list_all
    elsif item.nil?
      $control.list_help(file)
    else
      $control.show_item(file, item)
    end
  end

  desc "edit {help_name}", "edit HELP_NAME"
  def edit(help_name)
    $control = MyHelp::Control.new()
    $control.edit_help(help_name)
  end

  desc "new {help_name}", "make new HELP_NAME"
  def new(help_name)
    $control = MyHelp::Control.new()
    $control.init_help(help_name)
  end

  desc "delete {help_name}", "delete HELP_NAME"
  def delete(help_name)
    $control = MyHelp::Control.new()
    $control.delete_help(help_name)
  end

  
  desc "tomo_upload {help_name}", "tomo_upload HELP_NAME"
  def tomo_upload(help_name)
    $control = MyHelp::Control.new()
    $control.upload_help(help_name)
  end

  desc "search {find_char}", "search FIND_CHAR"
  def search(find_char)
    $control = MyHelp::Control.new()
    $control.search_help(find_char)
  end
end

MyCLI.start(ARGV)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my_help-0.8.0 exe/my_help