lib/openwfe/expressions/raw_prog.rb in openwferu-0.9.4 vs lib/openwfe/expressions/raw_prog.rb in openwferu-0.9.5

- old
+ new

@@ -173,55 +173,36 @@ # engine.launch(li) # </tt> # class ProcessDefinition - def initialize (exp_names=nil) + #def initialize (exp_names=nil) + def initialize () super() - if not exp_names - exp_names = $EXPRESSION_NAMES if $EXPRESSION_NAMES - else - if exp_names.kind_of? ExpressionMap - exp_names = exp_names.expression_names - elsif exp_names.kind_of? Engine - exp_names = exp_names.get_expression_map.expression_names - elsif exp_names.kind_of? Hash - exp_names = exp_names[S_EXPRESSION_MAP].expression_names - elsif not exp_names.kind_of? Array - exp_names = $EXPRESSION_NAMES - end - end - - if not exp_names - raise "no expression names found, please provide them" - end - - @exp_names = exp_names - - #exp_names.each do |exp_name| - # register_expression(exp_name) + #if not exp_names + # exp_names = $EXPRESSION_NAMES if $EXPRESSION_NAMES + #else + # if exp_names.kind_of? ExpressionMap + # exp_names = exp_names.expression_names + # elsif exp_names.kind_of? Engine + # exp_names = exp_names.get_expression_map.expression_names + # elsif exp_names.kind_of? Hash + # exp_names = exp_names[S_EXPRESSION_MAP].expression_names + # elsif not exp_names.kind_of? Array + # exp_names = $EXPRESSION_NAMES + # end #end + #if not exp_names + # raise "no expression names found, please provide them" + #end + #@exp_names = exp_names @previous_parent_expression = [] end - # - # previous trick - # - # kept for the record. - # - #def register_expression (expression_name) - # _exp_name = OpenWFE.make_safe(exp_name) - # self.instance_eval """ - # def #{_exp_name} (params={}, &block) - # make_expression('#{exp_name}', params, &block) - # end - # """ - #end - def method_missing (m, *args, &block) methodname = m.to_s expname = OpenWFE.to_expression_name(methodname) @@ -296,11 +277,11 @@ # # A class method for actually "making" the process # segment raw representation # - def ProcessDefinition.do_make (exp_names=nil) - self.new(exp_names).make + def ProcessDefinition.do_make () + self.new().make end end # # The actual 'programmatic' raw expression.