Class Merb::Rack::Irb
In: merb-core/lib/merb-core/rack/adapter/irb.rb
Parent: Object

Methods

sandboxed?   start  

Public Class methods

Parameters

opts<Hash>:

  Options for IRB. Currently this is not used by the IRB adapter.

Notes

If the +.irbrc+ file exists, it will be loaded into the IRBRC environment variable.

:api: plugin

[Source]

     # File merb-core/lib/merb-core/rack/adapter/irb.rb, line 149
149:       def self.start(opts={})
150:         m = Merb::Rack::Console.new
151:         m.extend Merb::Test::RequestHelper
152:         m.extend ::Webrat::Methods if defined?(::Webrat)
153:         Object.send(:define_method, :merb) { m }
154:         ARGV.clear # Avoid passing args to IRB
155:         m.open_sandbox! if sandboxed?
156:         require 'irb'
157:         require 'irb/completion'
158:         if File.exists? ".irbrc"
159:           ENV['IRBRC'] = ".irbrc"
160:         end
161:         IRB.start
162:         at_exit do merb.close_sandbox! if sandboxed? end
163:         exit
164:       end

Private Class methods

:api: private

[Source]

     # File merb-core/lib/merb-core/rack/adapter/irb.rb, line 169
169:       def self.sandboxed?
170:         Merb::Config[:sandbox]
171:       end

[Validate]