Module: Ghostable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/ghostable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/ghostable.rb', line 22 def method_missing(method_name, *args, &block) get_patterns.each do |basename, pattern| return method(basename).call(method_name, *args, &block) if method_name.to_s.match /#{pattern}/ end super end |