lib/ruote/svc/expression_map.rb in ruote-2.1.11 vs lib/ruote/svc/expression_map.rb in ruote-2.2.0

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2005-2010, John Mettraux, jmettraux@gmail.com +# Copyright (c) 2005-2011, John Mettraux, jmettraux@gmail.com # # 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, distribute, sublicense, and/or sell @@ -61,11 +61,11 @@ class ExpressionMap # Will load any expression in the Ruote::Exp:: namespace and map # its names to its class. # - def initialize (worker) + def initialize(worker) @map = {} Ruote::Exp.constants.each do |con| @@ -79,17 +79,17 @@ end end # Returns the expression class for the given expression name # - def expression_class (exp_name) + def expression_class(exp_name) @map[exp_name] end protected - def add (exp_class) + def add(exp_class) exp_class.expression_names.each { |n| @map[n] = exp_class } end end end