class Pod::Podfile

Constants

ALLOW_PRERELEASE
USE_BINARIES
USE_BINARIES_SELECTOR
USE_PLUGINS
USE_SOURCE_PODS

Public Instance Methods

allow_prerelease?() click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 47
def allow_prerelease?
  get_internal_hash_value(ALLOW_PRERELEASE, false) || ENV[ALLOW_PRERELEASE] == 'true'
end
old_plugins()
Alias for: plugins
plugins() click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 32
def plugins
  if ENV[USE_PLUGINS]
    env_plugins = ENV[USE_PLUGINS].split(',').each_with_object({}) do |name, result|
      result[name] = {}
    end
    env_plugins.merge!(old_plugins)
  else
    old_plugins
  end
end
Also aliased as: old_plugins
use_binaries?() click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 51
def use_binaries?
  get_internal_hash_value(USE_BINARIES, false) || ENV[USE_BINARIES] == 'true'
end
use_binaries_selector() click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 43
def use_binaries_selector
  get_internal_hash_value(USE_BINARIES_SELECTOR, nil)
end
use_source_pods() click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 55
def use_source_pods
  get_internal_hash_value(USE_SOURCE_PODS, []) + String(ENV[USE_SOURCE_PODS]).split('|').uniq
end

Private Instance Methods

get_internal_hash_value(key, default = nil) click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 74
def get_internal_hash_value(key, default = nil)
  internal_hash.fetch(key, default)
end
set_internal_hash_value(key, value) click to toggle source

set_hash_value 有 key 限制

# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 68
def set_internal_hash_value(key, value)
  valid_bin_plugin

  internal_hash[key] = value
end
valid_bin_plugin() click to toggle source
# File lib/cocoapods-pahealth-bin/native/podfile.rb, line 61
def valid_bin_plugin
  unless plugins.keys.include?('cocoapods-pahealth-bin')
    raise Pod::Informative, 'You should add `plugin \'cocoapods-pahealth-bin\'` before using its DSL'
  end
end