Sha256: cb0ace43b533c7443d75c3e5034166e954b4f692eec3e22e93eb57ba82abfa96

Contents?: true

Size: 512 Bytes

Versions: 19

Compression:

Stored size: 512 Bytes

Contents

# -*- encoding : utf-8 -*-

class Phrase::Tool::Commands::ShowHelp < Phrase::Tool::Commands::Base
  def initialize(options, args)
    super(options, args)
  end

  def execute!
    show_help
  end

private

  def show_help
    msg = "usage: phrase <command> [<args>]\n"
    Phrase::Tool::Commands.possible_commands.each do |command, suffix|
      msg << "    #{extract_help(command)}\n"
    end

    print_message msg
  end

  def extract_help(command)
    OptionsFactory.options_for(command, {}).help
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
phrase-0.4.33 lib/phrase/tool/commands/show_help.rb
phrase-0.4.32 lib/phrase/tool/commands/show_help.rb
phrase-0.4.31 lib/phrase/tool/commands/show_help.rb
phrase-0.4.30 lib/phrase/tool/commands/show_help.rb
phrase-0.4.29 lib/phrase/tool/commands/show_help.rb
phrase-0.4.28 lib/phrase/tool/commands/show_help.rb
phrase-0.4.27 lib/phrase/tool/commands/show_help.rb
phrase-0.4.26 lib/phrase/tool/commands/show_help.rb
phrase-0.4.25 lib/phrase/tool/commands/show_help.rb
phrase-0.4.24 lib/phrase/tool/commands/show_help.rb
phrase-0.4.23 lib/phrase/tool/commands/show_help.rb
phrase-0.4.22 lib/phrase/tool/commands/show_help.rb
phrase-0.4.21 lib/phrase/tool/commands/show_help.rb
phrase-0.4.20 lib/phrase/tool/commands/show_help.rb
phrase-0.4.19 lib/phrase/tool/commands/show_help.rb
phrase-0.4.18 lib/phrase/tool/commands/show_help.rb
phrase-0.4.17 lib/phrase/tool/commands/show_help.rb
phrase-0.4.16 lib/phrase/tool/commands/show_help.rb
phrase-0.4.15 lib/phrase/tool/commands/show_help.rb