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.
43 44 45 46 |
# File 'lib/utopia/content/markup.rb', line 43 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.
49 50 51 |
# File 'lib/utopia/content/markup.rb', line 49 def offset @offset end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
48 49 50 |
# File 'lib/utopia/content/markup.rb', line 48 def tag @tag end |
Instance Method Details
#to_s ⇒ Object
51 52 53 |
# File 'lib/utopia/content/markup.rb', line 51 def to_s "<#{@tag.name}#{@tag.attributes.empty? ? '' : ' ...'}>" end |