Class: Aozora2Html::Tag::Dir

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

Overview

書字方向(LTR)の指定用

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) ⇒ Dir

Returns a new instance of Dir.



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

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

Instance Method Details

#to_sObject



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

def to_s
  "<span dir=\"ltr\">#{@target}</span>"
end