def find_workspace params={}
      workspaces.find do |ws|
        matches = true

        # match each key to the given workspace
        params.keys.each do |key|
          matches = matches && (ws.send(key.to_sym) == params[key])
        end

        matches
      end
    end
def find_workspace params={}
      workspaces.find do |ws|
        matches = true

        # match each key to the given workspace
        params.keys.each do |key|
          matches = matches && (ws.send(key.to_sym) == params[key])
        end

        matches
      end
    end
Find a workspace according to the given params.