lib/glimmer/dsl/engine.rb in glimmer-1.0.6 vs lib/glimmer/dsl/engine.rb in glimmer-1.0.7

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2007-2020 Andy Maleh +# Copyright (c) 2007-2021 Andy Maleh # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, @@ -163,9 +163,10 @@ # Interprets Glimmer dynamic DSL expression consisting of keyword, args, and block (e.g. shell(:no_resize) { ... }) def interpret(keyword, *args, &block) return puts(MESSAGE_NO_DSLS) if no_dsls? keyword = keyword.to_s dynamic_expression_dsl = (dynamic_expression_chains_of_responsibility.keys - disabled_dsls).first if dsl.nil? + # TODO consider pushing this code into interpret_expresion to provide hooks that work around it regardless of static vs dynamic dsl_stack.push(dynamic_expression_dsl || dsl) expression = dynamic_expression_chains_of_responsibility[dsl].handle(parent, keyword, *args, &block) interpret_expression(expression, keyword, *args, &block) end