Module: Lolita::Hooks::InstanceMethods

Defined in:
lib/lolita/hooks.rb

Overview

Methods for instance.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &block) ⇒ Object

See Lolita::Hooks::ClassMethods#method_missing



391
392
393
394
395
# File 'lib/lolita/hooks.rb', line 391

def method_missing(*args,&block)
  unless self.class.recognize_hook_methods(*args,:scope=>self,&block)
    super
  end
end

Instance Method Details

#run(*hook_names, &block) ⇒ Object

See Lolita::Hooks::ClassMethods#run



384
385
386
387
388
# File 'lib/lolita/hooks.rb', line 384

def run(*hook_names,&block)
  options=hook_names ? hook_names.extract_options! : {}
  options[:scope]=self
  self.class.run(*hook_names,options,&block)
end