Sha256: 3e9667a1544e24bdb96d870fc7c2e9fbf62a782bf7046218a6b0501e47655a63

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

require "irb/command"

module Irbtools
  module Command
    class Look < IRB::Command::Base
      category "Introspection"
      description 'Method list and lookup path inspection based on the looksee gem'
      help_message <<~HELP
        Method list and lookup path inspection based on the looksee gem.

        Example usage: look [1,2,3]
      HELP

      def execute(arg)
        if arg.strip.empty?
          p @irb_context.workspace.binding.look
        else
          p @irb_context.workspace.binding.eval(arg).look
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
irbtools-4.1.0 lib/irbtools/commands/look.rb