Sha256: 7d17f6a662321d757b0bdd5994e60f741466dea2c6068f5651573d77a7b24663

Contents?: true

Size: 432 Bytes

Versions: 13

Compression:

Stored size: 432 Bytes

Contents

require 'erb'

module Commander
  module HelpFormatter
    class Terminal < Base
      def render
        template(:help).result @runner.get_binding
      end
      
      def render_command command
        template(:command_help).result command.get_binding
      end
      
      def template name
        ERB.new(File.read(File.expand_path(File.dirname(__FILE__)) + "/terminal/#{name}.erb"), nil, '-')
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
visionmedia-commander-3.0.0 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.0.1 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.0.2 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.0.3 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.0 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.1 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.2 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.4 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.5 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.6 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.7 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.1.8 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.0 lib/commander/help_formatters/terminal.rb