module Ruote
Public Class Methods
define(*attributes, &block)
click to toggle source
Override the default Ruote.define
and store the created pdef in a registry which can be read through Ruote.definition
# File lib/ruote-registry.rb, line 8 def define(*attributes, &block) pdef = RubyDsl.create_branch('define', attributes, &block) if (name = pdef[1]['name']) @pdef_registry ||= {} @pdef_registry[name.to_sym] = pdef end return pdef end
definition(name)
click to toggle source
Return a stored pdef
@param [String,Symbol] name The :name of the definition
# File lib/ruote-registry.rb, line 24 def definition(name) @pdef_registry[name.to_sym] end