Module: Pod::Podfile::ENVExecutor

Included in:
Pod::Podfile
Defined in:
lib/cocoapods-imy-bin/native/podfile_env.rb

Instance Method Summary collapse

Instance Method Details

#execute_with_allow_prerelease(allow_prerelease, &block) ⇒ Object



18
19
20
# File 'lib/cocoapods-imy-bin/native/podfile_env.rb', line 18

def execute_with_allow_prerelease(allow_prerelease, &block)
  execute_with_key(ALLOW_PRERELEASE, -> { allow_prerelease ? 'true' : 'false' }, &block)
end

#execute_with_bin_plugin(&block) ⇒ Object



14
15
16
# File 'lib/cocoapods-imy-bin/native/podfile_env.rb', line 14

def execute_with_bin_plugin(&block)
  execute_with_key(USE_PLUGINS, -> { 'cocoapods-imy-bin' }, &block)
end

#execute_with_key(key, value_returner) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/cocoapods-imy-bin/native/podfile_env.rb', line 30

def execute_with_key(key, value_returner)
  origin_value = ENV[key]
  ENV[key] = value_returner.call

  yield if block_given?

  ENV[key] = origin_value
end

#execute_with_use_binaries(use_binaries, &block) ⇒ Object



22
23
24
# File 'lib/cocoapods-imy-bin/native/podfile_env.rb', line 22

def execute_with_use_binaries(use_binaries, &block)
  execute_with_key(USE_BINARIES, -> { use_binaries ? 'true' : 'false' }, &block)
end

#execute_with_use_hmap(use_hmap, &block) ⇒ Object



26
27
28
# File 'lib/cocoapods-imy-bin/native/podfile_env.rb', line 26

def execute_with_use_hmap(use_hmap, &block)
  execute_with_key(USE_HMAP, -> { use_hmap ? 'true' : 'false' }, &block)
end