Class: Img_tag
- Inherits:
-
Aozora_tag
- Object
- Aozora_tag
- Img_tag
- Includes:
- Inline_tag
- Defined in:
- lib/t2hs.rb
Instance Method Summary collapse
-
#initialize(parser, filename, css_class, alt, width, height) ⇒ Img_tag
constructor
A new instance of Img_tag.
- #to_s ⇒ Object
Methods inherited from Aozora_tag
Constructor Details
#initialize(parser, filename, css_class, alt, width, height) ⇒ Img_tag
Returns a new instance of Img_tag.
658 659 660 661 |
# File 'lib/t2hs.rb', line 658 def initialize (parser, filename, css_class, alt, width, height) @filename = filename; @css_class = css_class; @alt = alt; @width = width; @height = height super end |
Instance Method Details
#to_s ⇒ Object
662 663 664 |
# File 'lib/t2hs.rb', line 662 def to_s "<img class=\"#{@css_class}\" width=\"#{@width}\" height=\"#{@height}\" src=\"#{@filename}\" alt=\"#{@alt}\" />" end |