Sha256: 5b2f7fdb20f547ef5937977d50ec086964ee8375aa1396dd2a1ad19660dd2cb8

Contents?: true

Size: 612 Bytes

Versions: 9

Compression:

Stored size: 612 Bytes

Contents

# frozen_string_literal: true
#
#   irb/help.rb - print usage module
#   	by Keiju ISHITSUKA(keiju@ishitsuka.com)
#

module IRB
  # Outputs the irb help message, see IRB@Command-Line+Options.
  def IRB.print_usage # :nodoc:
    lc = IRB.conf[:LC_MESSAGES]
    path = lc.find("irb/help-message")
    space_line = false
    File.open(path){|f|
      f.each_line do |l|
        if /^\s*$/ =~ l
          lc.puts l unless space_line
          space_line = true
          next
        end
        space_line = false

        l.sub!(/#.*$/, "")
        next if /^\s*$/ =~ l
        lc.puts l
      end
    }
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/irb-1.14.0/lib/irb/help.rb
irb-1.14.3 lib/irb/help.rb
irb-1.14.2 lib/irb/help.rb
irb-1.14.1 lib/irb/help.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/irb-1.13.2/lib/irb/help.rb
irb-1.14.0 lib/irb/help.rb
irb-1.13.2 lib/irb/help.rb
irb-1.13.1 lib/irb/help.rb
irb-1.13.0 lib/irb/help.rb