Class: Rake::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/core/core.rb

Instance Method Summary collapse

Instance Method Details

#in_namespace_with_global_scope(name, &block) ⇒ Object



90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/core/core.rb', line 90

def in_namespace_with_global_scope(name, &block)
  if name =~ /^:/
    begin
      scope, @scope = @scope, name.split(":")[1...-1]
      in_namespace_without_global_scope name.split(":").last, &block
    ensure
      @scope = scope
    end
  else
    in_namespace_without_global_scope name, &block
  end
end