Class: Aozora2Html::Tag::UnEmbedGaiji

Inherits:
Gaiji show all
Defined in:
lib/aozora2html/tag/un_embed_gaiji.rb

Overview

非埋め込み外字

Instance Method Summary collapse

Methods inherited from Gaiji

#char_type

Methods inherited from Aozora2Html::Tag

#char_type, #inspect, #syntax_error

Constructor Details

#initialize(parser, desc) ⇒ UnEmbedGaiji

Returns a new instance of UnEmbedGaiji.



9
10
11
12
13
# File 'lib/aozora2html/tag/un_embed_gaiji.rb', line 9

def initialize(parser, desc)
  @desc = desc
  @escaped = false
  super
end

Instance Method Details

#escape!Object



25
26
27
# File 'lib/aozora2html/tag/un_embed_gaiji.rb', line 25

def escape!
  @escaped = true
end

#escaped?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/aozora2html/tag/un_embed_gaiji.rb', line 21

def escaped?
  @escaped
end

#to_sObject



17
18
19
# File 'lib/aozora2html/tag/un_embed_gaiji.rb', line 17

def to_s
  '<span class="notes">['.to_sjis + @desc + ']</span>'.to_sjis
end