lib/blueprints/context.rb in blueprints-0.9.0 vs lib/blueprints/context.rb in blueprints-1.0.0
- old
+ new
@@ -131,9 +131,17 @@
# @param options (see Dependency#initialize)
def d(*args)
Dependency.new(*args)
end
+ # Finds blueprint/namespace by it's path
+ # @param path (see Namespace#[])
+ # @return (see Namespace#[])
+ def find(path)
+ @namespace[path]
+ end
+ alias [] find
+
# Return current context.
# @return [Blueprints::Context] Current context.
def self.current
@@chain.last
end