Module: Luruju::DynamicMethod
- Included in:
- JudeApi::JudeBase
- Defined in:
- lib/luruju/dynamic_method.rb
Defined Under Namespace
Classes: IsNotMyRole
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/luruju/dynamic_method.rb', line 10 def method_missing(method, *args) method_name = method.to_s methods.select{|m|/^dyna_.*/ =~ m.to_s}.sort.each { |dyna_method| begin return send(dyna_method, method, *args) rescue IsNotMyRole end } super end |