Class: Privacy::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-privacy/privacy/PrivacyConfig.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
9
# File 'lib/cocoapods-privacy/privacy/PrivacyConfig.rb', line 6

def initialize()
    config_content = File.read(PrivacyUtils.cache_config_file)
    @json = JSON.parse(config_content)
end

Class Method Details

.instanceObject



23
24
25
# File 'lib/cocoapods-privacy/privacy/PrivacyConfig.rb', line 23

def self.instance
    @instance ||= new
end

Instance Method Details

#api_template_urlObject



11
12
13
# File 'lib/cocoapods-privacy/privacy/PrivacyConfig.rb', line 11

def api_template_url
    return @json['api.template.url'] || ""
end

#source_black_listObject



15
16
17
# File 'lib/cocoapods-privacy/privacy/PrivacyConfig.rb', line 15

def source_black_list
    return @json['source.black.list'] || []
end

#source_white_listObject



19
20
21
# File 'lib/cocoapods-privacy/privacy/PrivacyConfig.rb', line 19

def source_white_list
    return @json['source.white.list'] || []
end