class HTMLClassMerge::GroupedTokens
- HTMLClassMerge::GroupedTokens
- Reference
- Object
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.crInstance Method Summary
-
#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
-
#remove!(group : Symbol) : self
remove any existing token for the specified group
- #tokens : Array(String)
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