Use the accessor.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10175 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-08-08 16:35:25 +00:00
parent e2d6f0af4e
commit 9553325ee3
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ module Redmine
# end
def macro(name, options={}, &block)
name = name.to_sym if name.is_a?(String)
@@available_macros[name] = {:desc => @@desc || ''}.merge(options)
available_macros[name] = {:desc => @@desc || ''}.merge(options)
@@desc = nil
raise "Can not create a macro without a block!" unless block_given?
Definitions.send :define_method, "macro_#{name}".downcase, &block