Module

Kernel

There's no documentation for this item.

Public Methods
__app_file_trace__ Returns an array with a stack trace of the application’s files.
__caller_info__ Gives you back the file, line and method of the caller number i
__caller_lines__ Gives you some context around a specific line in a file. the size argument works in both directions + the actual line, size = 2 gives you 5 lines of source, the returned array has the following format.
__profile__ Requires ruby-prof (sudo gem install ruby-prof) Takes a block and profiles the results of running the block 100 times. The resulting profile is written out to Merb.root/log/#{name}.html. min specifies the minimum percentage of the total time a method must take for it to be included in the result.
debugger define debugger method so that code even works if debugger was not requested Drops a not to the logs that Debugger was not available
dependencies Loads both gem and library dependencies that are passed in as arguments. Each argument can be:
dependency Note that this new version tries to load the file via ROOT/gems first before moving off to the system gems (so if you have a lower version of a gem in ROOT/gems, it’ll still get loaded)
extract_options_from_args! Extracts an options hash if it is the last item in the args array Used internally in methods that take *args
requires Requires the library string passed in. If the library fails to load then it will display a helpful message.
rescue_require does a basic require, and prints the message passed as an optional second parameter if an error occurs.
use_orm Used in Merb.root/dependencies.yml Tells merb which ORM (Object Relational Mapper) you wish to use. Currently merb has plugins to support ActiveRecord, DataMapper, and Sequel.
use_test Used in Merb.root/dependencies.yml Tells merb which testing framework to use. Currently merb supports rspec and test_unit for testing
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.