Module: Tzispa::Helpers::Hooks::Before::ClassMethods

Defined in:
lib/tzispa/helpers/hooks/before.rb

Instance Method Summary collapse

Instance Method Details

#before(*args) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/tzispa/helpers/hooks/before.rb', line 17

def before(*args)
  (@before_chain ||= []).tap do |bef|
    args&.each do |s|
      s = s.to_sym
      bef << s unless bef.include?(s)
    end
  end
end