Class: Tumblargh::Node::Tag
- Defined in:
- lib/tumblargh/node/tag.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#name ⇒ Object
22 23 24 |
# File 'lib/tumblargh/node/tag.rb', line 22 def name elements[1].text_value end |
#to_tree ⇒ Object
26 27 28 |
# File 'lib/tumblargh/node/tag.rb', line 26 def to_tree return [type, name] end |
#type ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/tumblargh/node/tag.rb', line 5 def type return @type if defined?(@type) n = name.split(':') if n.size == 2 @type = "#{n.first.camelize.to_sym}Tag" if @type == 'BlockTag' raise ParserError, "There's an unclosed block somewhere near `#{name}`" end @type else super end end |