Method: TagPurgeAction#unload

Defined in:
lib/extensions/mspec/mspec/runner/actions/tagpurge.rb

#unloadObject

Rewrites any matching tags. Prints non-matching tags. Deletes the tag file if there were no tags (this cleans up empty or malformed tag files).



36
37
38
39
40
41
42
43
44
45
# File 'lib/extensions/mspec/mspec/runner/actions/tagpurge.rb', line 36

def unload
  if @filter
    matched = @tags.select { |t| @matching.any? { |s| s == t.description } }
    MSpec.write_tags matched

    (@tags - matched).each { |t| print t.description, "\n" }
  else
    MSpec.delete_tags
  end
end