Class: DexSync::Config
- Inherits:
-
Object
- Object
- DexSync::Config
- Defined in:
- lib/dex_sync.rb
Instance Method Summary collapse
- #clusters ⇒ Object
- #dex ⇒ Object
- #domain ⇒ Object
- #download_path ⇒ Object
- #gh_session ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #namespaces ⇒ Object
- #user_session ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 |
# File 'lib/dex_sync.rb', line 10 def initialize @config = YAML.safe_load(File.read(File.('~/dex_sync.yaml'))) end |
Instance Method Details
#clusters ⇒ Object
30 31 32 |
# File 'lib/dex_sync.rb', line 30 def clusters @config.fetch('CLUSTERS') end |
#dex ⇒ Object
14 15 16 |
# File 'lib/dex_sync.rb', line 14 def dex @config.fetch('DEX') end |
#domain ⇒ Object
18 19 20 |
# File 'lib/dex_sync.rb', line 18 def domain @config.fetch('DOMAIN', 'github.com') end |
#download_path ⇒ Object
26 27 28 |
# File 'lib/dex_sync.rb', line 26 def download_path @config.fetch('DOWNLOAD_PATH', '~/.kubeconfigs') end |
#gh_session ⇒ Object
38 39 40 |
# File 'lib/dex_sync.rb', line 38 def gh_session @config.fetch('GH_SESSION') end |
#namespaces ⇒ Object
22 23 24 |
# File 'lib/dex_sync.rb', line 22 def namespaces @config.fetch('NAMESPACES') end |
#user_session ⇒ Object
34 35 36 |
# File 'lib/dex_sync.rb', line 34 def user_session @config.fetch('USER_SESSION') end |