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
A new instance of ParsedTag.
-
#to_s ⇒ Object
Constructor Details
#initialize(name, offset) ⇒ ParsedTag
Returns a new instance of ParsedTag
58 59 60 61 |
# File 'lib/utopia/content/markup.rb', line 58 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
64 65 66 |
# File 'lib/utopia/content/markup.rb', line 64 def offset @offset end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag
63 64 65 |
# File 'lib/utopia/content/markup.rb', line 63 def tag @tag end |
Instance Method Details
#to_s ⇒ Object
66 67 68 |
# File 'lib/utopia/content/markup.rb', line 66 def to_s "<#{@tag.name}#{@tag.attributes.empty? ? '' : ' ...'}>" end |