Module: HangingMethods::InstanceMethods
- Defined in:
- lib/hanging_methods.rb
Instance Method Summary collapse
- #add_hanging_method_name_and_args_invocation(hanging_method_name, method_name_and_args) ⇒ Object
- #hanging_method_invocations(hanging_method_name) ⇒ Object
Instance Method Details
#add_hanging_method_name_and_args_invocation(hanging_method_name, method_name_and_args) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/hanging_methods.rb', line 30 def add_hanging_method_name_and_args_invocation(hanging_method_name, method_name_and_args) hanging_method_invocations(hanging_method_name) << method_name_and_args ret = if after_invocation = self.method(hanging_method_name).owner.(hanging_method_name)[:after_invocation] send(after_invocation, method_name_and_args) end end |
#hanging_method_invocations(hanging_method_name) ⇒ Object
38 39 40 41 |
# File 'lib/hanging_methods.rb', line 38 def hanging_method_invocations(hanging_method_name) @hanging_method_invocations ||= {} @hanging_method_invocations[hanging_method_name] ||= [] end |