module FIR::Config
Constants
- API_YML_PATH
- APP_FILE_TYPE
- APP_INFO_PATH
- CONFIG_PATH
- XCODE_WRAPPER_PATH
Public Instance Methods
bughd_api()
click to toggle source
# File lib/fir/util/config.rb, line 15 def bughd_api @bughd_api ||= YAML.load_file(API_YML_PATH).deep_symbolize_keys[:bughd] end
config()
click to toggle source
# File lib/fir/util/config.rb, line 19 def config return unless File.exist?(CONFIG_PATH) @config ||= YAML.load_file(CONFIG_PATH).deep_symbolize_keys end
current_token()
click to toggle source
# File lib/fir/util/config.rb, line 36 def current_token @token ||= config[:token] if config end
fir_api()
click to toggle source
# File lib/fir/util/config.rb, line 11 def fir_api @fir_api ||= YAML.load_file(API_YML_PATH).deep_symbolize_keys[:fir] end
reload_config()
click to toggle source
# File lib/fir/util/config.rb, line 24 def reload_config @config = YAML.load_file(CONFIG_PATH).deep_symbolize_keys end
write_app_info(hash)
click to toggle source
# File lib/fir/util/config.rb, line 32 def write_app_info(hash) File.open(APP_INFO_PATH, 'w+') { |f| f << YAML.dump(hash) } end
write_config(hash)
click to toggle source
# File lib/fir/util/config.rb, line 28 def write_config(hash) File.open(CONFIG_PATH, 'w+') { |f| f << YAML.dump(hash) } end