Class: Pricecut::Elements::Img

Inherits:
Element
  • Object
show all
Defined in:
lib/pricecut/elements/img.rb

Instance Attribute Summary

Attributes inherited from Element

#node, #visitor

Instance Method Summary collapse

Methods inherited from Element

#append_newline, #append_output, #initialize, #yield_children

Constructor Details

This class inherits a constructor from Pricecut::Elements::Element

Instance Method Details

#output!Object



4
5
6
7
8
9
# File 'lib/pricecut/elements/img.rb', line 4

def output!
  alt = node["alt"]
  src = node["src"]

  p "![#{ alt }](#{ src })"
end