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.



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

#offsetObject (readonly)

Returns the value of attribute offset.



49
50
51
# File 'lib/utopia/content/markup.rb', line 49

def offset
  @offset
end

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



51
52
53
# File 'lib/utopia/content/markup.rb', line 51

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