#!/usr/bin/ruby require "vrlib" require "yard" # from require_all gem: require_rel 'src/' def start_my_yard # create /home/my_yard if doesn't exist unless File.directory?(File.join(Dir.home, "my_yard")) VR.copy_recursively File.join(File.dirname(__FILE__), "home_my_yard"), File.join(Dir.home, "my_yard") end VR::save_yaml(YardTheme.new(), File.join(Dir.home, "my_yard", "themes", "default.yaml")) $open_project = (ARGV[0] and File.directory?(ARGV[0])) ? File.expand_path(ARGV[0]) : Dir.pwd $env = VR::load_yaml(GlobalSettings, File.join(Dir.home, "my_yard", "global_settings.yaml")) loop do $env.add_project($open_project) proj = VR::load_yaml(MyYard, File.join($open_project, ".yardoc", "my_yard.yaml")) proj.show_glade() break if $open_project == :exit end end start_my_yard