Class: Slaw::Grammars::Inlines::Image

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/slaw/grammars/inlines_nodes.rb

Instance Method Summary collapse

Instance Method Details

#to_xml(b, idprefix) ⇒ Object



31
32
33
34
35
# File 'lib/slaw/grammars/inlines_nodes.rb', line 31

def to_xml(b, idprefix)
  attrs = {src: href.text_value}
  attrs[:alt] = content.text_value unless content.text_value.empty?
  b.img(attrs)
end