Class: Eiwa::Tag::Any

Inherits:
Object
  • Object
show all
Defined in:
lib/eiwa/tag/any.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#charactersObject (readonly)

Returns the value of attribute characters.



4
5
6
# File 'lib/eiwa/tag/any.rb', line 4

def characters
  @characters
end

#parentObject (readonly)

Returns the value of attribute parent.



4
5
6
# File 'lib/eiwa/tag/any.rb', line 4

def parent
  @parent
end

#tag_nameObject (readonly)

Returns the value of attribute tag_name.



4
5
6
# File 'lib/eiwa/tag/any.rb', line 4

def tag_name
  @tag_name
end

Instance Method Details

#add_characters(s) ⇒ Object



12
13
14
15
# File 'lib/eiwa/tag/any.rb', line 12

def add_characters(s)
  @characters ||= ""
  @characters << s.chomp
end

#end_child(child) ⇒ Object



17
18
# File 'lib/eiwa/tag/any.rb', line 17

def end_child(child)
end

#end_selfObject



20
21
# File 'lib/eiwa/tag/any.rb', line 20

def end_self
end

#start(tag_name, attrs, parent) ⇒ Object



6
7
8
9
10
# File 'lib/eiwa/tag/any.rb', line 6

def start(tag_name, attrs, parent)
  @tag_name = tag_name
  @attrs = Hash[attrs]
  @parent = parent
end

#to_sObject



23
24
25
# File 'lib/eiwa/tag/any.rb', line 23

def to_s
  "<#{@tag_name}>#{@characters}</#{@tag_name}>"
end