Method: AutomateIt::TagManager::TagParser.normalize
- Defined in:
- lib/automateit/tag_manager/tag_parser.rb
.normalize(text) ⇒ Object
Normalize a block of text to replace shortcut symbols that cause YAML to choke.
16 17 18 19 20 21 |
# File 'lib/automateit/tag_manager/tag_parser.rb', line 16 def self.normalize(text) return text \ .gsub(/^(\s*-\s+)(!@)/, '\1EXCLUDE_TAG ') \ .gsub(/^(\s*-\s+)(!)/, '\1EXCLUDE_HOST ') \ .gsub(/^(\s*-\s+)(@)/, '\1INCLUDE_TAG ') end |