Class: Markbridge::Parsers::BBCode::TagEndToken
- Defined in:
- lib/markbridge/parsers/bbcode/tokens/tag_end_token.rb
Overview
Token representing a closing BBCode tag like [/b]
Instance Attribute Summary collapse
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Attributes inherited from Token
Instance Method Summary collapse
-
#initialize(tag:, pos: 0, source: nil) ⇒ TagEndToken
constructor
A new instance of TagEndToken.
- #inspect ⇒ Object
Constructor Details
#initialize(tag:, pos: 0, source: nil) ⇒ TagEndToken
Returns a new instance of TagEndToken.
10 11 12 13 |
# File 'lib/markbridge/parsers/bbcode/tokens/tag_end_token.rb', line 10 def initialize(tag:, pos: 0, source: nil) super(pos:, source:) @tag = tag.freeze end |
Instance Attribute Details
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
8 9 10 |
# File 'lib/markbridge/parsers/bbcode/tokens/tag_end_token.rb', line 8 def tag @tag end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/markbridge/parsers/bbcode/tokens/tag_end_token.rb', line 15 def inspect "#<TagEndToken [/#{tag}]>" end |