Class: ToLatex::LatexString
Overview
A string converted to latex
Instance Method Summary collapse
- #+(other) ⇒ Object
- #concat(value) ⇒ Object (also: #<<)
- #latex! ⇒ Object
- #latex? ⇒ Boolean
- #to_latex ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#+(other) ⇒ Object
47 48 49 |
# File 'lib/to_latex.rb', line 47 def +(other) dup.concat(other) end |
#concat(value) ⇒ Object Also known as: <<
37 38 39 40 41 42 43 |
# File 'lib/to_latex.rb', line 37 def concat value if value.latex? super value else super value.to_latex end end |
#latex! ⇒ Object
29 30 31 |
# File 'lib/to_latex.rb', line 29 def latex! self end |
#latex? ⇒ Boolean
33 34 35 |
# File 'lib/to_latex.rb', line 33 def latex? true end |
#to_latex ⇒ Object
25 26 27 |
# File 'lib/to_latex.rb', line 25 def to_latex self end |
#to_s ⇒ Object
51 52 53 |
# File 'lib/to_latex.rb', line 51 def to_s self end |