Class: Frac
Instance Method Summary collapse
-
#initialize(some_numer, some_denom) ⇒ Frac
constructor
A new instance of Frac.
- #latex ⇒ Object
Methods inherited from Latex
#*, #**, #+, #-, #-@, #/, #glue, #is, #my_json, #ne, #of, #to_ltx, #wrap
Constructor Details
#initialize(some_numer, some_denom) ⇒ Frac
Returns a new instance of Frac.
165 166 167 168 |
# File 'lib/annlat/LaRuby.rb', line 165 def initialize(some_numer, some_denom) @numer = some_numer.to_ltx @denom = some_denom.to_ltx end |
Instance Method Details
#latex ⇒ Object
170 171 172 |
# File 'lib/annlat/LaRuby.rb', line 170 def latex '\frac{' + @numer.latex + '}{' + @denom.latex + '}' end |