A
Ahmed Eldawy
Detective is a new gem build by BadrIT (www.badrit.com) to investigate
the ruby source code.
Example
View the source of a class method ...
require 'detective'
Detective.view_source('ActiveRecord::Base.find_by_sql')
Result
def find_by_sql(sql)
connection.select_all(sanitize_sql(sql), "#{name} Load").collect!
{ |record| instantiate(record) }
end
Detective is hosted on gemcutter
[sudo] gem install detective
More examples and details on Detective homepage
http://github.com/aseldawy/detective
the ruby source code.
Example
View the source of a class method ...
require 'detective'
Detective.view_source('ActiveRecord::Base.find_by_sql')
Result
def find_by_sql(sql)
connection.select_all(sanitize_sql(sql), "#{name} Load").collect!
{ |record| instantiate(record) }
end
Detective is hosted on gemcutter
[sudo] gem install detective
More examples and details on Detective homepage
http://github.com/aseldawy/detective