Method: ProjectGroup::Configs#group_for_dir

Defined in:
lib/project_group/config.rb

#group_for_dir(dir) ⇒ Object



84
85
86
87
88
89
90
91
92
93
94
# File 'lib/project_group/config.rb', line 84

def group_for_dir(dir)
  dir = File.expand_path(dir)
  dir = dir.gsub("/Users/mharris717/Dropbox/CodeLink","/code")
  groups.find do |group|
    group.singles.any? do |proj|
      path = File.expand_path(proj.path)
      path = path.gsub("/Users/mharris717/Dropbox/CodeLink","/code")
      File.expand_path(path) == dir
    end
  end
end