Class: Markbridge::Parsers::BBCode::TagStartToken
- Defined in:
- lib/markbridge/parsers/bbcode/tokens/tag_start_token.rb
Overview
Token representing an opening BBCode tag like [b] or [url=...]
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Attributes inherited from Token
Instance Method Summary collapse
-
#initialize(tag:, attrs:, pos:, source:) ⇒ TagStartToken
constructor
A new instance of TagStartToken.
Constructor Details
#initialize(tag:, attrs:, pos:, source:) ⇒ TagStartToken
Returns a new instance of TagStartToken.
10 11 12 13 14 |
# File 'lib/markbridge/parsers/bbcode/tokens/tag_start_token.rb', line 10 def initialize(tag:, attrs:, pos:, source:) super(pos:, source:) @tag = tag.freeze @attrs = attrs.freeze end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
8 9 10 |
# File 'lib/markbridge/parsers/bbcode/tokens/tag_start_token.rb', line 8 def attrs @attrs end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
8 9 10 |
# File 'lib/markbridge/parsers/bbcode/tokens/tag_start_token.rb', line 8 def tag @tag end |