Class: Lhj::IOSRobotConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/lhj/helper/ios_robot_config.rb

Overview

ios Robot Config

Constant Summary collapse

CONFIG_NAME =
'ios_robot_config.yml'

Class Method Summary collapse

Class Method Details

.agent_idObject



22
23
24
# File 'lib/lhj/helper/ios_robot_config.rb', line 22

def self.agent_id
  config['agent_id']
end

.app_keyObject



26
27
28
# File 'lib/lhj/helper/ios_robot_config.rb', line 26

def self.app_key
  config['app_key']
end

.app_secretObject



30
31
32
# File 'lib/lhj/helper/ios_robot_config.rb', line 30

def self.app_secret
  config['app_secret']
end

.base_urlObject



34
35
36
# File 'lib/lhj/helper/ios_robot_config.rb', line 34

def self.base_url
  config['base_url']
end

.cleanObject



18
19
20
# File 'lib/lhj/helper/ios_robot_config.rb', line 18

def self.clean
  @yaml = nil
end

.configObject



14
15
16
# File 'lib/lhj/helper/ios_robot_config.rb', line 14

def self.config
  @yaml ||= YAML.load_file(config_file)
end

.config_fileObject



10
11
12
# File 'lib/lhj/helper/ios_robot_config.rb', line 10

def self.config_file
  File.join(Lhj::Config.instance.home_dir, CONFIG_NAME)
end