Class: Utopia::Content::MarkupParser::ParsedTag

Inherits:
Object
  • Object
show all
Defined in:
lib/utopia/content/markup.rb

Overview

A tag generated by parsing markup.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#offsetObject (readonly)

Returns the value of attribute offset.



68
69
70
# File 'lib/utopia/content/markup.rb', line 68

def offset
  @offset
end

#tagObject (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_sObject

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