Method: Aruba::BasicConfiguration#after

Defined in:
lib/aruba/basic_configuration.rb

#after(name) { ... } ⇒ Object

Define after-hook

Parameters:

  • name (Symbol, String)

    The name of the hook

Yields:

  • The code block which should be run. This is a configure time only option

Raises:

  • (ArgumentError)


144
145
146
147
148
149
150
151
# File 'lib/aruba/basic_configuration.rb', line 144

def after(name, &block)
  name = format("%s_%s", "after_", name.to_s).to_sym
  raise ArgumentError, "A block is required" unless block

  @hooks.append(name, block)

  self
end