# File lib/rubyful_soup.rb, line 574 def pop_tag tag = @tag_stack.pop #puts "Pop #{ tag.name }" # Tags with just one string-owning child get the child as a # 'string' property, so that soup.tag.string is shorthand for # soup.tag.contents[0] if @currentTag.contents.length == 1 and @currentTag.contents[0].is_a? NavigableString @currentTag.string = @currentTag.contents[0] end @currentTag = @tag_stack[-1] unless @tag_stack.empty? @currentTag end