Class: Coradoc::Element::Inline::Subscript

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/element/inline/subscript.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#children_accessors, children_accessors, declare_children, #simplify_block_content, visit, #visit

Constructor Details

#initialize(content) ⇒ Subscript

Returns a new instance of Subscript.



9
10
11
# File 'lib/coradoc/element/inline/subscript.rb', line 9

def initialize(content)
  @content = content
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/coradoc/element/inline/subscript.rb', line 5

def content
  @content
end

Instance Method Details

#to_adocObject



13
14
15
16
# File 'lib/coradoc/element/inline/subscript.rb', line 13

def to_adoc
  content = Coradoc::Generator.gen_adoc(@content)
  "~#{content}~"
end