class CoverBoard::Config
Constants
- DOT_FILE
- ENDPOINT
- HOST
- HTTPS
- PORT
Public Class Methods
endpoint()
click to toggle source
# File lib/api/config.rb, line 34 def self.endpoint from_yml 'endpoint', ENDPOINT end
host()
click to toggle source
# File lib/api/config.rb, line 26 def self.host from_yml 'host', HOST end
https()
click to toggle source
# File lib/api/config.rb, line 42 def self.https from_yml 'https', HTTPS end
password()
click to toggle source
# File lib/api/config.rb, line 22 def self.password from_yml 'password' end
port()
click to toggle source
# File lib/api/config.rb, line 30 def self.port from_yml 'port', PORT end
uid()
click to toggle source
# File lib/api/config.rb, line 14 def self.uid from_yml 'uid' end
user()
click to toggle source
# File lib/api/config.rb, line 18 def self.user from_yml 'user' end
verbose()
click to toggle source
# File lib/api/config.rb, line 38 def self.verbose from_yml 'verbose', false end
Private Class Methods
from_yml(key, default='')
click to toggle source
# File lib/api/config.rb, line 47 def self.from_yml(key, default='') if @@config.nil? path = "#{Dir.pwd}/#{DOT_FILE}" if File.exists? path @@config = YAML.load(File.read(path)) end end return default if @@config.nil? || @@config['coverboard'][key].nil? @@config['coverboard'][key] end