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:
parent
e2d6f0af4e
commit
9553325ee3
|
@ -82,7 +82,7 @@ module Redmine
|
||||||
# end
|
# end
|
||||||
def macro(name, options={}, &block)
|
def macro(name, options={}, &block)
|
||||||
name = name.to_sym if name.is_a?(String)
|
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
|
@@desc = nil
|
||||||
raise "Can not create a macro without a block!" unless block_given?
|
raise "Can not create a macro without a block!" unless block_given?
|
||||||
Definitions.send :define_method, "macro_#{name}".downcase, &block
|
Definitions.send :define_method, "macro_#{name}".downcase, &block
|
||||||
|
|
Loading…
Reference in New Issue