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

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

#offsetObject (readonly)

Returns the value of attribute offset.



64
65
66
# File 'lib/utopia/content/markup.rb', line 64

def offset
  @offset
end

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



66
67
68
# File 'lib/utopia/content/markup.rb', line 66

def to_s
	"<#{@tag.name}#{@tag.attributes.empty? ? '' : ' ...'}>"
end