Class: Huml::SelectorList

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/huml.rb

Constant Summary collapse

TYPES =
{ "." => :class, "#" => :id }

Instance Method Summary collapse

Instance Method Details

#tokenizeObject



67
68
69
# File 'lib/huml.rb', line 67

def tokenize
  elements.map { |e| [:html, :attr, TYPES[e.type.text_value], [:static, e.name.text_value]] }
end