Class: EacRubyUtils::MethodClass::Setup
- Defined in:
- lib/eac_ruby_utils/method_class.rb
Instance Method Summary collapse
Instance Method Details
#method_name ⇒ Object
27 28 29 |
# File 'lib/eac_ruby_utils/method_class.rb', line 27 def method_name method_class.name.demodulize.underscore.variableize end |
#perform ⇒ Object
20 21 22 23 24 25 |
# File 'lib/eac_ruby_utils/method_class.rb', line 20 def perform the_setup = self sender_module.define_method(method_name) do |*args, &block| the_setup.method_class.new(self, *args, &block).result end end |
#sender_module ⇒ Object
31 32 33 34 35 |
# File 'lib/eac_ruby_utils/method_class.rb', line 31 def sender_module r = method_class.module_parent r = r.singleton_class if static_method r end |