Class: Markbridge::Parsers::BBCode::TextToken
- Defined in:
- lib/markbridge/parsers/bbcode/tokens/text_token.rb
Overview
Token representing text content
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Token
Instance Method Summary collapse
-
#initialize(text:, pos:) ⇒ TextToken
constructor
A new instance of TextToken.
Constructor Details
#initialize(text:, pos:) ⇒ TextToken
Returns a new instance of TextToken.
10 11 12 13 |
# File 'lib/markbridge/parsers/bbcode/tokens/text_token.rb', line 10 def initialize(text:, pos:) super(pos:, source: text) @text = text.freeze end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
8 9 10 |
# File 'lib/markbridge/parsers/bbcode/tokens/text_token.rb', line 8 def text @text end |