Class: Decidim::ContentParsers::UserGroupParser
- Inherits:
-
UserParser
- Object
- BaseParser
- TagParser
- UserParser
- Decidim::ContentParsers::UserGroupParser
- Defined in:
- decidim-core/lib/decidim/content_parsers/user_group_parser.rb
Overview
A parser that searches user groups mentions in content.
A word starting with ‘@` will be considered as a possible mention if they only contains letters, numbers or underscores.
Defined Under Namespace
Classes: Metadata
Constant Summary collapse
- MENTION_REGEX =
Matches a nickname if contains letters, numbers or underscores.
/\B@(\w*)\b/
Constants inherited from BaseParser
Instance Attribute Summary
Attributes inherited from BaseParser
Instance Method Summary collapse
-
#metadata ⇒ Metadata
abstract
Collects and returns metadata.
Methods inherited from TagParser
Methods inherited from BaseParser
Methods included from Decidim::ContentProcessor::Common
#html_content?, #html_fragment
Constructor Details
This class inherits a constructor from Decidim::ContentParsers::BaseParser
Instance Method Details
#metadata ⇒ Metadata
This method is abstract.
Subclass is expected to implement it
Collects and returns metadata. This metadata is accessible at parsing time so it can be acted upon (sending emails to the users) or maybe even stored at the DB for later consultation.
22 23 24 |
# File 'decidim-core/lib/decidim/content_parsers/user_group_parser.rb', line 22 def Metadata.new(existing_mentionables) end |