Class: Utopia::Content::MarkupParser::ParsedTag
- Inherits:
-
Object
- Object
- Utopia::Content::MarkupParser::ParsedTag
- Defined in:
- lib/utopia/content/markup.rb
Overview
A tag generated by parsing markup.
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(name, offset) ⇒ ParsedTag
constructor
Initialize a parsed opening tag at a source offset.
-
#to_s ⇒ Object
Convert this object to a string.
Constructor Details
#initialize(name, offset) ⇒ ParsedTag
Initialize a parsed opening tag at a source offset.
62 63 64 65 |
# File 'lib/utopia/content/markup.rb', line 62 def initialize(name, offset) @offset = offset @tag = Tag.new(name, false, SymbolicHash.new) end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
68 69 70 |
# File 'lib/utopia/content/markup.rb', line 68 def offset @offset end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
67 68 69 |
# File 'lib/utopia/content/markup.rb', line 67 def tag @tag end |
Instance Method Details
#to_s ⇒ Object
Convert this object to a string.
72 73 74 |
# File 'lib/utopia/content/markup.rb', line 72 def to_s "<#{@tag.name}#{@tag.attributes.empty? ? '' : ' ...'}>" end |