Class: Aozora2Html::Tag::InlineCaption

Inherits:
ReferenceMentioned show all
Defined in:
lib/aozora2html/tag/inline_caption.rb

Overview

インラインキャプション

Instance Attribute Summary

Attributes inherited from ReferenceMentioned

#target

Instance Method Summary collapse

Methods inherited from ReferenceMentioned

#block_element?, #target_string

Methods inherited from Aozora2Html::Tag

#char_type, #inspect, #syntax_error

Constructor Details

#initialize(parser, target) ⇒ InlineCaption

Returns a new instance of InlineCaption.



7
8
9
10
# File 'lib/aozora2html/tag/inline_caption.rb', line 7

def initialize(parser, target)
  @target = target
  super
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/aozora2html/tag/inline_caption.rb', line 12

def to_s
  "<span class=\"caption\">#{@target}</span>"
end