adjust API

This commit is contained in:
Sam
2017-02-14 16:32:33 -05:00
parent 89d5e8ab4b
commit f2099c3811
2 changed files with 4 additions and 4 deletions

View File

@ -6,11 +6,11 @@ class TopicList
cattr_accessor :preloaded_custom_fields
self.preloaded_custom_fields = Set.new
def self.on_preload(blk)
def self.on_preload(&blk)
(@preload ||= Set.new) << blk
end
def self.cancel_preload(blk)
def self.cancel_preload(&blk)
if @preload
@preload.delete blk
if @preload.length == 0