Module: WhoDelegated::ActiveRecordExtensionClassMethods
- Defined in:
- lib/who_delegated/active_record_extension_class_methods.rb
Instance Method Summary collapse
Instance Method Details
#delegated_method?(method_name) ⇒ Boolean
5 6 7 |
# File 'lib/who_delegated/active_record_extension_class_methods.rb', line 5 def delegated_method?(method_name) respond_to?("delegated_#{method_name}?") && send("delegated_#{method_name}?") end |
#delegated_target(method_name) ⇒ Object
9 10 11 12 13 |
# File 'lib/who_delegated/active_record_extension_class_methods.rb', line 9 def delegated_target(method_name) return unless delegated_method?(method_name) send("delegated_#{method_name}?") end |