module DohApp

Public Instance Methods

init_from_file(filepath) click to toggle source
# File lib/dohutil/app/util.rb, line 12
def init_from_file(filepath)
  Doh.find_root_from_file(filepath)
  DohApp.require_custom_config
end
name() click to toggle source
# File lib/dohutil/app/name.rb, line 4
def name
  @name ||= File.basename($PROGRAM_NAME, '.rb')
end
name=(appname) click to toggle source
# File lib/dohutil/app/name.rb, line 8
def name=(appname)
  @name = appname
end
require_custom_config() click to toggle source
# File lib/dohutil/app/util.rb, line 6
def require_custom_config
  raise "Doh.root not found" if !Doh.root
  path = File.expand_path(File.join(Doh.root, 'config/dohapp.rb'))
  require(path) if File.exist?(path)
end