Sha256: 7ca444ea1bdaa973785988e5d0a65a684403c8cab117916d45b2e9fd0d209e83

Contents?: true

Size: 387 Bytes

Versions: 27

Compression:

Stored size: 387 Bytes

Contents

require "irb"

module Sitepress
  # Interactive REPL for Sitepress project
  class REPL
    def initialize(context:)
      @context = context
    end

    # Start interactive REPL.
    def start
      IRB.setup nil
      IRB.conf[:MAIN_CONTEXT] = IRB::Irb.new.context
      IRB.conf[:PROMPT_MODE] = :SIMPLE
      require 'irb/ext/multi-irb'
      IRB.irb nil, @context
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
sitepress-cli-4.0.5 lib/sitepress/repl.rb
sitepress-cli-4.0.4 lib/sitepress/repl.rb
sitepress-cli-4.0.3 lib/sitepress/repl.rb
sitepress-cli-4.0.2 lib/sitepress/repl.rb
sitepress-cli-4.0.1 lib/sitepress/repl.rb
sitepress-cli-4.0.0 lib/sitepress/repl.rb
sitepress-cli-4.0.0.beta1 lib/sitepress/repl.rb
sitepress-cli-3.2.2 lib/sitepress/repl.rb
sitepress-cli-3.2.1 lib/sitepress/repl.rb
sitepress-cli-3.2.0 lib/sitepress/repl.rb
sitepress-cli-3.1.4 lib/sitepress/repl.rb
sitepress-cli-3.1.3 lib/sitepress/repl.rb
sitepress-cli-3.1.2 lib/sitepress/repl.rb
sitepress-cli-3.1.1 lib/sitepress/repl.rb
sitepress-cli-3.0.1 lib/sitepress/repl.rb
sitepress-cli-2.0.0 lib/sitepress/repl.rb
sitepress-cli-2.0.0.beta11 lib/sitepress/repl.rb
sitepress-cli-2.0.0.beta10 lib/sitepress/repl.rb
sitepress-cli-2.0.0.beta9 lib/sitepress/repl.rb
sitepress-cli-2.0.0.beta8 lib/sitepress/repl.rb