class Bow::Config
Constants
- GUEST_BASE_DIR
- GUEST_FROM_HOST_BASE_DIR
- HOST_BASE_DIR
- PATHS
Public Class Methods
guest()
click to toggle source
# File lib/bow/config.rb, line 10 def guest @guest ||= Config.new(:guest, GUEST_BASE_DIR) end
guest_from_host()
click to toggle source
# File lib/bow/config.rb, line 14 def guest_from_host @guest_from_host ||= Config.new(:guest, GUEST_FROM_HOST_BASE_DIR) end
host()
click to toggle source
# File lib/bow/config.rb, line 6 def host @host ||= Config.new(:host, HOST_BASE_DIR) end
new(type, base_dir)
click to toggle source
# File lib/bow/config.rb, line 38 def initialize(type, base_dir) @type = type @base_dir = base_dir end
Public Instance Methods
[](name)
click to toggle source
# File lib/bow/config.rb, line 53 def [](name) get(name) end
get(name)
click to toggle source
# File lib/bow/config.rb, line 43 def get(name) name.to_sym value = PATHS[@type][name] substitude_dir(value) end
substitude_dir(orig)
click to toggle source
# File lib/bow/config.rb, line 49 def substitude_dir(orig) format(orig, @base_dir) if orig end