Class: Plurimath::Math::Function::Table::Array
- Inherits:
 - 
      Plurimath::Math::Function::Table
      
        
- Object
 - Core
 - Plurimath::Math::Function::Table
 - Plurimath::Math::Function::Table::Array
 
 
- Defined in:
 - lib/plurimath/math/function/table/array.rb
 
Instance Attribute Summary
Attributes inherited from Plurimath::Math::Function::Table
#close_paren, #open_paren, #options, #value
Instance Method Summary collapse
- #array_args ⇒ Object
 - 
  
    
      #initialize(value = [], open_paren = "[", close_paren = "]", options = {})  ⇒ Array 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Array.
 - #to_latex ⇒ Object
 - #to_mathml_without_math_tag ⇒ Object
 
Methods inherited from Plurimath::Math::Function::Table
#==, #class_name, #to_asciimath, #to_html, #to_omml_without_math_tag
Methods inherited from Core
#class_name, #empty_tag, #insert_t_tag, #nary_attr_value, #omml_parameter, #tag_name, #validate_function_formula
Constructor Details
#initialize(value = [], open_paren = "[", close_paren = "]", options = {}) ⇒ Array
Returns a new instance of Array.
      10 11 12 13 14 15  | 
    
      # File 'lib/plurimath/math/function/table/array.rb', line 10 def initialize(value = [], open_paren = "[", close_paren = "]", = {}) super end  | 
  
Instance Method Details
#array_args ⇒ Object
      21 22 23 24 25 26 27 28 29 30 31  | 
    
      # File 'lib/plurimath/math/function/table/array.rb', line 21 def array_args args = [] value.first.parameter_one.each do |td| args << if Utility.symbol_value(td.parameter_one.first, "|") "|" else Utility::ALIGNMENT_LETTERS.invert[Hash(td.parameter_two)[:columnalign]]&.to_s end end "{#{args.join}}" unless args.compact.empty? end  | 
  
#to_latex ⇒ Object
      17 18 19  | 
    
      # File 'lib/plurimath/math/function/table/array.rb', line 17 def to_latex "\\begin{array}#{array_args}#{latex_content}\\end{array}" end  | 
  
#to_mathml_without_math_tag ⇒ Object
      33 34 35 36 37 38 39  | 
    
      # File 'lib/plurimath/math/function/table/array.rb', line 33 def to_mathml_without_math_tag table_tag = Utility.ox_element("mtable", attributes: table_attribute) Utility.update_nodes( table_tag, value&.map(&:to_mathml_without_math_tag), ) end  |