Sha256: 97476484352891cfcdae2a4186333f080db2a32445e60984ba28cdfb9138f5da

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

module Ripl
  module Irb
    VERSION = '0.1.0'

    def before_loop
      mock_irb
      super
    end

    def mock_irb
      Object.const_set(:IRB, Module.new).extend MockIrb
    end

    module MockIrb
      def const_missing(*args)
        self.const_set(args[0], Module.new.extend(MockIrb))
      end

      def method_missing(*)
      end
    end
  end
end

Ripl::Shell.send :include, Ripl::Irb if defined? Ripl::Shell

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ripl-irb-0.1.0 lib/ripl/irb.rb