Module: Mixin::PatchingBehavior

Included in:
Pod::AggregateTarget, Pod::Installer, Pod::Podfile
Defined in:
lib/cocoapods-spm/helpers/patch.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



10
11
12
# File 'lib/cocoapods-spm/helpers/patch.rb', line 10

def self.included(base)
  base.extend(self)
end

Instance Method Details

#patch_method(method_name, &block) ⇒ Object



3
4
5
6
7
8
# File 'lib/cocoapods-spm/helpers/patch.rb', line 3

def patch_method(method_name, &block)
  raw_method_name = "origin_#{method_name}"
  alias_method raw_method_name, method_name
  define_method(method_name, &block)
  private raw_method_name
end