Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/everyday_thor_util/common.rb

Instance Method Summary collapse

Instance Method Details

#create_method(name, &block) ⇒ Object



2
3
4
# File 'lib/everyday_thor_util/common.rb', line 2

def create_method(name, &block)
  self.send(:define_method, name, &block)
end

#dup_method(new_name, old_name) ⇒ Object



6
7
8
# File 'lib/everyday_thor_util/common.rb', line 6

def dup_method(new_name, old_name)
  self.send(:alias_method, new_name, old_name)
end