Class: PinkShirt::SAX::Images

Inherits:
Base
  • Object
show all
Defined in:
lib/pink_shirt/sax/images.rb

Constant Summary collapse

TAGS =
%(img)

Instance Method Summary collapse

Methods inherited from Base

#add_attributes, #initialize, #method_missing, #to_s

Constructor Details

This class inherits a constructor from PinkShirt::SAX::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PinkShirt::SAX::Base

Instance Method Details

#end_imgObject



15
16
17
# File 'lib/pink_shirt/sax/images.rb', line 15

def end_img

end

#start_img(attrs) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/pink_shirt/sax/images.rb', line 5

def start_img attrs
  title   = attrs['alt'] || attrs['title']
  title   = nil if title == "" || title == " "
  image   = "!"
  image  += attrs['src']
  image  += "(#{title})" if title
  image  += "!"
  @output << image
end