Sha256: e1d4ea12e32df6d185fe76fb30aba13f2421584742dc785aa7ae622b4b401213

Contents?: true

Size: 435 Bytes

Versions: 9

Compression:

Stored size: 435 Bytes

Contents

# frozen_string_literal: true

module IRB
  # :stopdoc:

  module Command
    class Whereami < Base
      category "Context"
      description "Show the source code around binding.irb again."

      def execute(_arg)
        code = irb_context.workspace.code_around_binding
        if code
          puts code
        else
          puts "The current context doesn't have code."
        end
      end
    end
  end

  # :startdoc:
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/command/whereami.rb
irb-1.14.3 lib/irb/command/whereami.rb
irb-1.14.2 lib/irb/command/whereami.rb
irb-1.14.1 lib/irb/command/whereami.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/irb-1.13.2/lib/irb/command/whereami.rb
irb-1.14.0 lib/irb/command/whereami.rb
irb-1.13.2 lib/irb/command/whereami.rb
irb-1.13.1 lib/irb/command/whereami.rb
irb-1.13.0 lib/irb/command/whereami.rb