Class: VivlioStarter::CLI::TocCommands::Heading
- Inherits:
-
Struct
- Object
- Struct
- VivlioStarter::CLI::TocCommands::Heading
- Defined in:
- lib/vivlio_starter/cli/toc.rb
Instance Attribute Summary collapse
-
#css_class ⇒ Object
Returns the value of attribute css_class.
-
#href ⇒ Object
Returns the value of attribute href.
-
#level ⇒ Object
Returns the value of attribute level.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#list_markup ⇒ Object
見出し情報から TOC 用の
- 文字列を生成する タグを使用してクリックで該当ページへジャンプ可能にする.
Instance Attribute Details
#css_class ⇒ Object
Returns the value of attribute css_class
332 333 334 |
# File 'lib/vivlio_starter/cli/toc.rb', line 332 def css_class @css_class end |
#href ⇒ Object
Returns the value of attribute href
332 333 334 |
# File 'lib/vivlio_starter/cli/toc.rb', line 332 def href @href end |
#level ⇒ Object
Returns the value of attribute level
332 333 334 |
# File 'lib/vivlio_starter/cli/toc.rb', line 332 def level @level end |
#text ⇒ Object
Returns the value of attribute text
332 333 334 |
# File 'lib/vivlio_starter/cli/toc.rb', line 332 def text @text end |
Instance Method Details
#list_markup ⇒ Object
見出し情報から TOC 用の
335 336 337 338 339 340 341 |
# File 'lib/vivlio_starter/cli/toc.rb', line 335 def list_markup if href && !href.empty? %(<li class="#{css_class}"><a href="#{href}" class="toc-title"><span class="toc-label">#{text}</span></a>) else %(<li class="#{css_class}"><span class="toc-title"><span class="toc-label">#{text}</span></span>) end end |