Module: Deptree::DSL
- Defined in:
- lib/deptree/dsl.rb
Instance Method Summary collapse
- #configure(*names) ⇒ Object
- #dependency(*args, &block) ⇒ Object
- #helpers(&block) ⇒ Object
- #registry ⇒ Object
Instance Method Details
#configure(*names) ⇒ Object
8 9 10 11 12 |
# File 'lib/deptree/dsl.rb', line 8 def configure(*names) Visitor.each(registry.select(*names)) do |dependency| dependency.execute(:configure) end end |
#dependency(*args, &block) ⇒ Object
4 5 6 |
# File 'lib/deptree/dsl.rb', line 4 def dependency(*args, &block) Definition.add(self, args, block) end |
#helpers(&block) ⇒ Object
14 15 16 17 18 |
# File 'lib/deptree/dsl.rb', line 14 def helpers(&block) @helpers ||= Module.new @helpers.module_eval(&block) if block_given? @helpers end |