Class: IRuby::Command
- Inherits:
-
Object
- Object
- IRuby::Command
- Defined in:
- lib/iruby/command.rb
Constant Summary collapse
- IRUBYDIR =
'~/.config/iruby'
Instance Method Summary collapse
-
#initialize(args) ⇒ Command
constructor
A new instance of Command.
- #run ⇒ Object
Constructor Details
#initialize(args) ⇒ Command
Returns a new instance of Command.
7 8 9 |
# File 'lib/iruby/command.rb', line 7 def initialize(args) @args = args end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/iruby/command.rb', line 11 def run raise 'Use --iruby-dir instead of --ipython-dir!' unless @args.grep(/\A--ipython-dir=.*\Z/).empty? if @args.first == 'kernel' run_kernel else run_ipython end end |