Sha256: f21497343a35180853321a44d3af8c2f8c0d7e731812df8f50eb33a8ddc9f5e8

Contents?: true

Size: 545 Bytes

Versions: 7

Compression:

Stored size: 545 Bytes

Contents

# frozen_string_literal: true

require 'irb'
require 'irb/completion'
require 'nsrr/models/all'

module Nsrr
  module Commands
    # Allows console to be started with the NSRR environment.
    class Console
      class << self
        def start(*args)
          new(*args).start
        end
      end

      attr_reader :console

      def initialize(_argv)
        ARGV.clear
        @console = IRB
      end

      def start
        puts "Loading environment (Nsrr #{Nsrr::VERSION::STRING})"
        @console.start
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nsrr-0.4.0 lib/nsrr/commands/console.rb
nsrr-0.4.0.rc lib/nsrr/commands/console.rb
nsrr-0.4.0.beta1 lib/nsrr/commands/console.rb
nsrr-0.3.0 lib/nsrr/commands/console.rb
nsrr-0.3.0.rc lib/nsrr/commands/console.rb
nsrr-0.3.0.beta2 lib/nsrr/commands/console.rb
nsrr-0.3.0.beta1 lib/nsrr/commands/console.rb