Class AutomateIt::TagManager::TagParser
In: lib/automateit/tag_manager/tag_parser.rb
Parent: Object

TagManager::TagParser

Helper class for parsing tags. Not useful for users — for internal use only.

Methods

expand   expand   expand!   hosts_for   new   normalize   normalize!   tags  

Included Modules

Nitpick

Constants

HOSTS_FOR_VALUE = /(.+?)/
HOSTS_FOR_INCLUDE_TAG_RE = /^INCLUDE_TAG #{HOSTS_FOR_VALUE}$/
HOSTS_FOR_EXCLUDE_TAG_RE = /^EXCLUDE_TAG #{HOSTS_FOR_VALUE}$/
HOSTS_FOR_EXCLUDE_HOST_RE = /^EXCLUDE_HOST #{HOSTS_FOR_VALUE}$/

Attributes

struct  [RW] 

Public Class methods

Expand the struct.

Create a parser for the struct, a hash of tag keys to values with arrays of items.

Normalize a block of text to replace shortcut symbols that cause YAML to choke.

Public Instance methods

Expand the include/exclude/group rules and return a struct with only the hosts these rules produce.

Replace the internal struct with an expanded version, see expand.

Return array of hosts for the tag.

Normalize the contents of the internal struct.

Return array of tags.

[Validate]