class HTMLClassMerge::GroupedTokens

Overview

Represents an ordered list of tokens, which are grouped by a symbol. Only one token per group is stored. The order of the tokens is determined by the order in which they are added.

Defined in:

html_class_merge/grouped_tokens.cr

Instance Method Summary

Instance Method Detail

def add!(token : String, group : Symbol | Nil) : self #

Add a token, optionally to group If a token for the group already exists, it will be removed and the new token will be added at the end of the list


[View source]
def remove!(group : Symbol) : self #

remove any existing token for the specified group


[View source]
def tokens : Array(String) #

[View source]