# File lib/util/constants.rb, line 66 def add_constant(key, value) self.const_set(key, value) @pn_by_value ||= {} @pn_by_value[value] = key if self.respond_to? :post_add_constant self.post_add_constant(key, value) end end
# File lib/util/constants.rb, line 77 def by_value(value) (@pn_by_value || {})[value] end