Module: Selenium::More::Hooks::ClassMethods

Defined in:
lib/selenium/more/hooks.rb

Instance Method Summary collapse

Instance Method Details

#hook(method_name, opts) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/selenium/more/hooks.rb', line 33

def hook(method_name, opts)
  if instance_methods.include?(method_name.to_sym)
    prepend Hooks.module_to_prepend(method_name, opts)
  else
    raise NoMethodError, "no #{method_name} to hook"
  end
end