Sha256: 05cf2a95c0b987f1a7f9d1048b89a753b310c87a50bfc79d8603fb10715a1a4d

Contents?: true

Size: 641 Bytes

Versions: 7

Compression:

Stored size: 641 Bytes

Contents

# frozen_string_literal: false
#
#   change-ws.rb -
#   	by Keiju ISHITSUKA(keiju@ruby-lang.org)
#

require_relative "nop"
require_relative "../ext/change-ws"

module IRB
  # :stopdoc:

  module ExtendCommand

    class CurrentWorkingWorkspace < Nop
      category "IRB"
      description "Show the current workspace."

      def execute(*obj)
        irb_context.main
      end
    end

    class ChangeWorkspace < Nop
      category "IRB"
      description "Change the current workspace to an object."

      def execute(*obj)
        irb_context.change_workspace(*obj)
        irb_context.main
      end
    end
  end

  # :startdoc:
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
irb-1.7.4 lib/irb/cmd/chws.rb
irb-1.7.3 lib/irb/cmd/chws.rb
irb-1.7.2 lib/irb/cmd/chws.rb
irb-1.7.1 lib/irb/cmd/chws.rb
irb-1.7.0 lib/irb/cmd/chws.rb
irb-1.6.4 lib/irb/cmd/chws.rb
irb-1.6.3 lib/irb/cmd/chws.rb