An Array with a compile method
# File lib/active_support/callbacks.rb, line 350 350: def compile(key=nil, object=nil) 351: method = [] 352: method << "value = nil" 353: method << "halted = false" 354: 355: each do |callback| 356: method << callback.start(key, object) 357: end 358: 359: if config[:rescuable] 360: method << "rescued_error = nil" 361: method << "begin" 362: end 363: 364: method << "value = yield if block_given? && !halted" 365: 366: if config[:rescuable] 367: method << "rescue Exception => e" 368: method << "rescued_error = e" 369: method << "end" 370: end 371: 372: reverse_each do |callback| 373: method << callback.end(key, object) 374: end 375: 376: method << "raise rescued_error if rescued_error" if config[:rescuable] 377: method << "halted ? false : (block_given? ? value : true)" 378: method.compact.join("\n") 379: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.