Sha256: af6d9567aa7494f05e0a0ab415d11432f237ac45b6bea90691d63a442e776536

Contents?: true

Size: 426 Bytes

Versions: 24

Compression:

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

Version data entries

24 entries across 24 versions & 5 rubygems

Version Path
commander-4.2.1 lib/commander/help_formatters/terminal.rb
crishoj-commander-3.3.0 lib/commander/help_formatters/terminal.rb
ktec-commander-3.3.1 lib/commander/help_formatters/terminal.rb
commander-4.2.0 lib/commander/help_formatters/terminal.rb
clone-1.0.0.beta2 module/gems/commander-4.1.3/lib/commander/help_formatters/terminal.rb
clone-1.0.0.beta module/gems/commander-4.1.3/lib/commander/help_formatters/terminal.rb
commander-4.1.6 lib/commander/help_formatters/terminal.rb
taco_it-1.5.3 lib/taco/commander/help_formatters/terminal.rb
commander-4.1.5 lib/commander/help_formatters/terminal.rb
taco_it-1.5.2 lib/taco/commander/help_formatters/terminal.rb
commander-4.1.4 lib/commander/help_formatters/terminal.rb
commander-4.1.3 lib/commander/help_formatters/terminal.rb
commander-4.1.2 lib/commander/help_formatters/terminal.rb
commander-4.1.1 lib/commander/help_formatters/terminal.rb
commander-4.1.0 lib/commander/help_formatters/terminal.rb
commander-4.0.7 lib/commander/help_formatters/terminal.rb
commander-4.0.6 lib/commander/help_formatters/terminal.rb
commander-4.0.5 lib/commander/help_formatters/terminal.rb
commander-4.0.4 lib/commander/help_formatters/terminal.rb
commander-4.0.3 lib/commander/help_formatters/terminal.rb