Module: MetaRuby::DSLs::FindThroughMethodMissing
- Defined in:
- lib/metaruby/dsls/find_through_method_missing.rb
Overview
Common definition of #respond_to_missing? and #method_missing to be used in conjunction with find_through_method_missing and has_through_method_missing?
Instance Method Summary collapse
-
#find_through_method_missing(m, args) ⇒ Object
Empty implementation of find_through_method_missing to allow for classes to call ‘super’.
-
#has_through_method_missing?(m) ⇒ Boolean
Empty implementation of has_through_method_missing? to allow for classes to call ‘super’.
-
#method_missing(m, *args) ⇒ Object
Resolves the given method using #find_through_method_missing.
-
#respond_to_missing?(m, include_private) ⇒ Boolean
Resolves the given method using #has_through_method_missing?.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
Resolves the given method using #find_through_method_missing
58 59 60 |
# File 'lib/metaruby/dsls/find_through_method_missing.rb', line 58 def method_missing(m, *args) find_through_method_missing(m, args) || super end |
Instance Method Details
#find_through_method_missing(m, args) ⇒ Object
Empty implementation of find_through_method_missing to allow for classes to call ‘super’
49 50 |
# File 'lib/metaruby/dsls/find_through_method_missing.rb', line 49 def find_through_method_missing(m, args) end |
#has_through_method_missing?(m) ⇒ Boolean
Empty implementation of has_through_method_missing? to allow for classes to call ‘super’
44 45 |
# File 'lib/metaruby/dsls/find_through_method_missing.rb', line 44 def has_through_method_missing?(m) end |
#respond_to_missing?(m, include_private) ⇒ Boolean
Resolves the given method using #has_through_method_missing?
53 54 55 |
# File 'lib/metaruby/dsls/find_through_method_missing.rb', line 53 def respond_to_missing?(m, include_private) has_through_method_missing?(m) || super end |