Class: Plurimath::Unitsml
- Inherits:
-
Object
- Object
- Plurimath::Unitsml
- Defined in:
- lib/plurimath/unitsml.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ Unitsml
constructor
A new instance of Unitsml.
- #to_formula ⇒ Object
Constructor Details
#initialize(text) ⇒ Unitsml
Returns a new instance of Unitsml.
8 9 10 |
# File 'lib/plurimath/unitsml.rb', line 8 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/plurimath/unitsml.rb', line 6 def text @text end |
Instance Method Details
#to_formula ⇒ Object
12 13 14 |
# File 'lib/plurimath/unitsml.rb', line 12 def to_formula ::Unitsml.parse(text).to_plurimath end |