Class: Markbridge::AST::Mention
- Defined in:
- lib/markbridge/ast/mention.rb
Overview
Represents a user or group mention (@username or @groupname).
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The username or group name (without @).
-
#type ⇒ Symbol
readonly
The type of mention (:user or :group).
Instance Method Summary collapse
-
#initialize(name:, type: :user) ⇒ Mention
constructor
Create a new Mention node.
Constructor Details
#initialize(name:, type: :user) ⇒ Mention
Create a new Mention node.
23 24 25 26 |
# File 'lib/markbridge/ast/mention.rb', line 23 def initialize(name:, type: :user) @name = name @type = type end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns the username or group name (without @).
14 15 16 |
# File 'lib/markbridge/ast/mention.rb', line 14 def name @name end |
#type ⇒ Symbol (readonly)
Returns the type of mention (:user or :group).
17 18 19 |
# File 'lib/markbridge/ast/mention.rb', line 17 def type @type end |