Class: Plurimath::Mathml::Transform

Inherits:
Parslet::Transform
  • Object
show all
Defined in:
lib/plurimath/mathml/transform.rb

Class Method Summary collapse

Class Method Details

.get_class(text) ⇒ Object



183
184
185
# File 'lib/plurimath/mathml/transform.rb', line 183

def self.get_class(text)
  Object.const_get("Plurimath::Math::Function::#{text.to_s.capitalize}")
end

.raise_error!(open_tag, close_tag) ⇒ Object



187
188
189
190
191
192
# File 'lib/plurimath/mathml/transform.rb', line 187

def self.raise_error!(open_tag, close_tag)
  message = "Please check your input."\
            " Opening tag is \"#{open_tag}\""\
            " and closing tag is \"#{close_tag}\""
  raise Plurimath::Math::Error.new(message)
end