Class: RedGrape::Tools::IRG

Inherits:
Object show all
Defined in:
lib/red_grape/tools/irg.rb

Defined Under Namespace

Modules: Help

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.start(port = nil, &block) ⇒ Object



50
51
52
# File 'lib/red_grape/tools/irg.rb', line 50

def start(port=nil, &block)
  self.new.start port, &block
end

Instance Method Details

#start(port = nil, &block) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/red_grape/tools/irg.rb', line 55

def start(port=nil, &block)
  Kernel.module_eval %Q{
    def redgrape?(key=nil)
      RedGrape::Tools::IRG::Help.redgrape? key
    end
    alias rg? redgrape?
  }

  RedGrape.set_auto_take
  $store = RedGrape::Tools::Trellis.open port if port
  block.call if block
  IRB.start
end