Module: Pod::Installer::InstallationOptions::Mixin::ClassMethods

Defined in:
lib/cocoapods/installer/installation_options.rb

Instance Method Summary collapse

Instance Method Details

#delegate_installation_option_attributes!Void

Delegates the installation options attributes directly to Pod::Installer::InstallationOptions::Mixin#installation_options.

Returns:

  • (Void)


133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/cocoapods/installer/installation_options.rb', line 133

def delegate_installation_option_attributes!
  define_method(:respond_to_missing?) do |name, *args|
    installation_options.respond_to?(name, *args) || super
  end

  define_method(:method_missing) do |name, *args, &blk|
    if installation_options.respond_to?(name)
      installation_options.send(name, *args, &blk)
    else
      super
    end
  end
end

#delegate_installation_options(&blk) ⇒ Void

Delegates the creation of Pod::Installer::InstallationOptions::Mixin#installation_options to the ‘Podfile` returned by the given block.

Parameters:

  • blk

    a block that returns the ‘Podfile` to create installation options from.

Returns:

  • (Void)


122
123
124
125
126
# File 'lib/cocoapods/installer/installation_options.rb', line 122

def delegate_installation_options(&blk)
  define_method(:installation_options) do
    @installation_options ||= InstallationOptions.from_podfile(instance_eval(&blk))
  end
end