Sha256: b85e3bd644c39494ad224c7f8d6f0d552f63a8025c81a2f7e04ad3016ac720cf

Contents?: true

Size: 582 Bytes

Versions: 1

Compression:

Stored size: 582 Bytes

Contents

require "irb/command"

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

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