Class: PinkShirt::SAX::Images

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

Constant Summary

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

- (Object) end_img



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

def end_img

end

- (Object) start_img(attrs)



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