Module: Phlex::Kit::LazyLoader
- Included in:
- Phlex::Kit
- Defined in:
- lib/phlex/kit.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, **kwargs, &block) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/phlex/kit.rb', line 5
def method_missing(name, *args, **kwargs, &block)
if name[0] == name[0].upcase && __phlex_kit_constants__.include?(name) && __get_phlex_kit_constant__(name) && methods.include?(name)
public_send(name, *args, **kwargs, &block)
else
super
end
end
|
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
13
14
15
16
17
18
19
|
# File 'lib/phlex/kit.rb', line 13
def respond_to_missing?(name, include_private = false)
if name[0] == name[0].upcase && __phlex_kit_constants__.include?(name) && __get_phlex_kit_constant__(name) && methods.include?(name)
true
else
super
end
end
|