Class: Ovec::TextCommandsNode
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(command, content, text: true) ⇒ TextCommandsNode
constructor
If verbatim, do not interpret content as actual text.
- #text? ⇒ Boolean
- #to_tex ⇒ Object
Constructor Details
#initialize(command, content, text: true) ⇒ TextCommandsNode
If verbatim, do not interpret content as actual text.
19 20 21 22 23 |
# File 'lib/ovec/nodes.rb', line 19 def initialize(command, content, text: true) @command = command @content = content @text = text end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
31 32 33 |
# File 'lib/ovec/nodes.rb', line 31 def command @command end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
32 33 34 |
# File 'lib/ovec/nodes.rb', line 32 def content @content end |
Instance Method Details
#text? ⇒ Boolean
29 |
# File 'lib/ovec/nodes.rb', line 29 def text?; @text; end |
#to_tex ⇒ Object
25 26 27 |
# File 'lib/ovec/nodes.rb', line 25 def to_tex "\\#@command{#{@content.to_tex}}" end |