lib/openwfe/expressions/raw_prog.rb in openwferu-0.9.2 vs lib/openwfe/expressions/raw_prog.rb in openwferu-0.9.3

- old
+ new

@@ -123,15 +123,15 @@ s = "" tab = " " ind = tab * indentation s << ind - s << OpenWFE.make_safe(@name) + s << OpenWFE::make_safe(@name) sa = "" @attributes.each do |k, v| - sa << ", :#{k} => '#{v}'" + sa << ", :#{OpenWFE::to_underscore(k)} => '#{v}'" end s << sa[1..-1] if sa.length > 0 if @children.length > 0 s << " do\n" @@ -223,18 +223,20 @@ def method_missing (m, *args, &block) methodname = m.to_s expname = OpenWFE.to_expression_name(methodname) - if not @exp_names.include? expname - #raise "No expression named '#{methodname}' (#{expname}) found" - #raise "No expression named '#{expname}' found" - params = args[0] - params = {} if not params - params["ref"] = methodname - return make_expression("subprocess", params, &block) - end + + #if not @exp_names.include? expname + # #raise "No expression named '#{methodname}' (#{expname}) found" + # #raise "No expression named '#{expname}' found" + # params = args[0] + # params = {} if not params + # params["ref"] = methodname + # return make_expression("subprocess", params, &block) + #end + make_expression(expname, args[0], &block) end # # This method has to be overriden in order to define @@ -365,10 +367,10 @@ # # 'undo' isn't reserved by Ruby, but lets keep it in line # with 'do' and 'redo' that are. # KEYWORDS = [ - :if, :do, :redo, :undo, :print + :if, :do, :redo, :undo, :print, :sleep, :loop, :break ] # # Ensures the method name is not conflicting with Ruby keywords # and turn dashes to underscores.