An Array with a compile method
# File lib/couchrest/mixins/callbacks.rb, line 366 def clone(klass) chain = CallbackChain.new(@symbol) chain.push(*map {|c| c.clone(klass)}) end
# File lib/couchrest/mixins/callbacks.rb, line 353 def compile(key = nil, options = {}) method = [] method << "halted = false" each do |callback| method << callback.start(key, options) end method << "yield self if block_given? && !halted" reverse_each do |callback| method << callback.end(key, options) end method.compact.join("\n") end
# File lib/couchrest/mixins/callbacks.rb, line 349 def initialize(symbol) @symbol = symbol end