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.



60
61
62
63
# File 'lib/utopia/content/markup.rb', line 60

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.



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

def offset
  @offset
end

#tagObject (readonly)

Returns the value of attribute tag.



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

def tag
  @tag
end

Instance Method Details

#to_sObject



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

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