Class: AssocBinOpe

Inherits:
BinOpe show all
Defined in:
lib/annlat/LaRuby.rb

Direct Known Subclasses

Product

Instance Attribute Summary

Attributes inherited from BinOpe

#args, #oper

Instance Method Summary collapse

Methods inherited from Latex

#*, #**, #+, #-, #-@, #/, #glue, #is, #my_json, #ne, #of, #to_ltx, #wrap

Constructor Details

#initialize(some_oper, *some_args) ⇒ AssocBinOpe

Returns a new instance of AssocBinOpe.



136
137
138
# File 'lib/annlat/LaRuby.rb', line 136

def initialize(some_oper, *some_args) 
  super(some_oper, *(some_args.map{|a| (a.kind_of?(AssocBinOpe) and (a.oper == @oper))? a.args : a}.flatten))
end

Instance Method Details

#latexObject



140
141
142
# File 'lib/annlat/LaRuby.rb', line 140

def latex() 
   @args.map{|i| i.latex}.join(@oper.latex)
end