Class: ZergXcode::Plugins::Irb
- Inherits:
-
Object
- Object
- ZergXcode::Plugins::Irb
- Defined in:
- lib/zerg_xcode/plugins/irb.rb
Overview
Loads up an Xcode project and the ZergXcode library into an irb shell.
Instance Method Summary collapse
Instance Method Details
#help ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/zerg_xcode/plugins/irb.rb', line 15 def help {:short => 'opens up a project in an interactive ruby shell', :long => "Usage: irb [path]\n\nLoads the object graph in the Xcode project at the given path. If no path is\ngiven, looks for a project in the current directory. The project object is\navailable as the global variable $p.\n" } end |
#run(args) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/zerg_xcode/plugins/irb.rb', line 26 def run(args) $p = ZergXcode.load(args.shift || '.') print "This is an IRB shell. Your project is available as $p.\n" + "Use the 'quit' command if you're here by mistake.\n" IRB.start __FILE__ end |