File: terminal_compact.rb

package info (click to toggle)
ruby-commander 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 364 kB
  • sloc: ruby: 1,969; makefile: 9
file content (17 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'erb'

module Commander
  module HelpFormatter
    class TerminalCompact < Terminal
      def template(name)
        if RUBY_VERSION < '2.6'
          ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal_compact', "#{name}.erb")), nil, '-')
        else
          ERB.new(File.read(File.join(File.dirname(__FILE__), 'terminal_compact', "#{name}.erb")), trim_mode: '-')
        end
      end
    end
  end
end