Sha256: 7e257c7f84fdef6ac7d18c5b8aca88586021ef532294ea1b3652d322e629d4f6

Contents?: true

Size: 1.01 KB

Versions: 38

Compression:

Stored size: 1.01 KB

Contents

module YARD
  module CLI
    # Lists all markup types
    # @since 0.8.6
    class MarkupTypes < Command
      def description; 'Lists all available markup types and libraries' end

      # Runs the commandline utility, parsing arguments and displaying a
      # list of markup types
      #
      # @param [Array<String>] args the list of arguments.
      # @return [void]
      def run(*args)
        log.puts "Available markup types for `doc' command:"
        log.puts
        types = Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS
        exts = Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS
        types.sort_by {|name, _| name.to_s }.each do |name, providers|
          log.puts "[#{name}]"
          libs = providers.map {|p| p[:lib] }.compact
          if libs.size > 0
            log.puts "  Providers: #{libs.join(" ")}"
          end
          if exts[name]
            log.puts "  Extensions: #{exts[name].map {|e| ".#{e}"}.join(" ")}"
          end

          log.puts
        end
      end
    end
  end
end

Version data entries

38 entries across 33 versions & 7 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/lib/yard/cli/markup_types.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/lib/yard/cli/markup_types.rb
yard-0.9.5 lib/yard/cli/markup_types.rb
yard-0.9.4 lib/yard/cli/markup_types.rb
yard-0.9.3 lib/yard/cli/markup_types.rb
yard-0.9.2 lib/yard/cli/markup_types.rb
yard-0.9.1 lib/yard/cli/markup_types.rb
yard-0.9.0 lib/yard/cli/markup_types.rb
yard-0.8.7.6 lib/yard/cli/markup_types.rb
yard-0.8.7.5 lib/yard/cli/markup_types.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
yard-0.8.7.4 lib/yard/cli/markup_types.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/cli/markup_types.rb