Method: CopyMethod::Integration#copy_method
- Defined in:
- lib/copy_method/integration.rb
#copy_method(name, from: nil, to: nil, remove: false, singleton: false) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/copy_method/integration.rb', line 3 def copy_method(name, from: nil, to: nil, remove: false, singleton: false) if from.nil? && to.nil? raise ArgumentError, "must specify either `from` or `to` keywords" end from = self if from.nil? to = self if to.nil? CopyMethod.copy_method name, from: from, to: to, remove: remove, singleton: singleton end |