Sha256: 6980f374d62647ea6d010e551302577708bd078ec7a0b695660e0df972ee5868
Contents?: true
Size: 482 Bytes
Versions: 29
Compression:
Stored size: 482 Bytes
Contents
module ActiveRestClient module Recording module ClassMethods @record_response = nil def record_response(url = nil, response = nil, &block) if url && response && @record_response @record_response.call(url, response) elsif block @record_response = block end end def record_response? !!@record_response end end def self.included(base) base.extend(ClassMethods) end end end
Version data entries
29 entries across 29 versions & 1 rubygems