Module: Slick::Concern
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
15
16
17
|
# File 'lib/slick/concern.rb', line 15
def method_missing(*args, &block)
missing_method_calls << [args, block]
end
|
Instance Method Details
#included(_module) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/slick/concern.rb', line 8
def included(_module)
missing_method_calls.each do |missing_method_call|
args, block = missing_method_call
_module.send *args, &block
end
end
|
#missing_method_calls ⇒ Object
4
5
6
|
# File 'lib/slick/concern.rb', line 4
def missing_method_calls
@missing_method_calls ||= []
end
|