Module Remarkable::DSL::Callbacks::ClassMethods
In: lib/remarkable/dsl/callbacks.rb

Methods

Protected Instance methods

Class method that accepts a block or a symbol which is called after initialization.

Examples

  after_initialize :evaluate_given_blocks

  after_initialize do
    # code
  end

[Source]

    # File lib/remarkable/dsl/callbacks.rb, line 22
22:           def after_initialize(*symbols, &block)
23:             if block_given?
24:               @after_initialize_callbacks << block
25:             else
26:               @after_initialize_callbacks += symbols
27:             end
28:           end

Class method that accepts a block or a symbol which is called before running assertions.

Examples

  before_assert :evaluate_given_blocks

  before_assert do
    # code
  end

[Source]

    # File lib/remarkable/dsl/callbacks.rb, line 41
41:           def before_assert(*symbols, &block)
42:             if block_given?
43:               @before_assert_callbacks << block
44:             else
45:               @before_assert_callbacks += symbols
46:             end
47:           end

[Validate]