Sha256: f9bc488982cabbb76c481357bfa8ed43e1d86ab4d8dac0cb8672551f1ff49482

Contents?: true

Size: 411 Bytes

Versions: 8

Compression:

Stored size: 411 Bytes

Contents

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.join(File.dirname(__FILE__), 'terminal', "#{name}.erb")), nil, '-')
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
visionmedia-commander-3.2.2 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.3 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.4 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.5 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.6 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.7 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.8 lib/commander/help_formatters/terminal.rb
visionmedia-commander-3.2.9 lib/commander/help_formatters/terminal.rb