lib/openwfe/rudefinitions.rb in openwferu-0.9.16 vs lib/openwfe/rudefinitions.rb in openwferu-0.9.17

- old
+ new

@@ -83,10 +83,13 @@ @application_context[S_EXPRESSION_MAP] end def get_wfid_generator @application_context[S_WFID_GENERATOR] end + def get_expool + @application_context[S_EXPRESSION_POOL] + end def get_expression_pool @application_context[S_EXPRESSION_POOL] end def get_expression_storage @application_context[S_EXPRESSION_STORAGE] @@ -109,15 +112,14 @@ # # Returns all the expression storage in the application context # (there is usually a cache and a persisted exp storage). # def get_expression_storages - result = [] - @application_context.each do |k, v| - result << v \ - if OpenWFE::starts_with(k.to_s, S_EXPRESSION_STORAGE) + + @application_context.inject([]) do |r, (k, v)| + r << v if OpenWFE::starts_with(k.to_s, S_EXPRESSION_STORAGE) + r end - result end end end