lib/remarkable/dsl/callbacks.rb in remarkable-3.1.0 vs lib/remarkable/dsl/callbacks.rb in remarkable-3.1.1

- old
+ new

@@ -17,15 +17,15 @@ # # after_initialize do # # code # end # - def after_initialize(symbol=nil, &block) + def after_initialize(*symbols, &block) if block_given? @after_initialize_callbacks << block - elsif symbol - @after_initialize_callbacks << symbol + else + @after_initialize_callbacks += symbols end end # Class method that accepts a block or a symbol which is called before # running assertions. @@ -36,14 +36,14 @@ # # before_assert do # # code # end # - def before_assert(symbol=nil, &block) + def before_assert(*symbols, &block) if block_given? @before_assert_callbacks << block - elsif symbol - @before_assert_callbacks << symbol + else + @before_assert_callbacks += symbols end end end def run_after_initialize_callbacks #:nodoc: