Class: Nsrr::Commands::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/nsrr/commands/console.rb

Overview

Allows console to be started with the NSRR environment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_argv) ⇒ Console

Returns a new instance of Console.



19
20
21
22
# File 'lib/nsrr/commands/console.rb', line 19

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

Instance Attribute Details

#consoleObject (readonly)

Returns the value of attribute console.



17
18
19
# File 'lib/nsrr/commands/console.rb', line 17

def console
  @console
end

Class Method Details

.start(*args) ⇒ Object



12
13
14
# File 'lib/nsrr/commands/console.rb', line 12

def start(*args)
  new(*args).start
end

Instance Method Details

#startObject



24
25
26
27
# File 'lib/nsrr/commands/console.rb', line 24

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