Recién me acabo de cruzar con unos artículos sobre IRB que me parecieron piolas y aprendí un par de trucos que la verdad que no sabia.
los dejo para el disfrute http://tagaholic.me/2009/05/29/exploring-how-to-configure-irb.html http://tagaholic.me/2009/05/11/demystifying-irb-commands.html vale la pena también, pegarse una vuelta por el repositorio de github que tiene algunas cosas muy interesantes para agregar al toolset http://github.com/cldwalker/irbfiles/tree/master y algunos links para releer http://www.rubycentral.com/book/irb.html http://errtheblog.com/posts/24-irb-mix-tape este es mi configuración actual de irb [1], pero luego de leer esto voy a agregarle algunos trucos más... alguien tiene algún truco para compartir ?... [1] ------8<---------------------------------------------------------------------------- require 'rubygems' require 'wirble' require 'utility_belt' require 'pp' Wirble.init Wirble.colorize if ENV.include?('RAILS_ENV') if !Object.const_defined?('RAILS_DEFAULT_LOGGER') require 'logger' Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT)) end def sql(query) ActiveRecord::Base.connection.select_all(query) end end class Object def non_class_methods self.methods - Class.methods end def own_methods (self.methods - Object.methods).sort end def local_methods(go_supper=false) (self.methods - Object.instance_methods(go_super)).sort end end ------8<---------------------------------------------------------------------------- -- :: nelson :: [ artesano de software & software craftsman ] http://netflux.com.ar
_______________________________________________ Ruby mailing list [email protected] http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
