Class: Rake::NameSpace

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

Overview

The NameSpace class will lookup task names in the the scope defined by a namespace command.

Instance Method Summary collapse

Constructor Details

#initialize(task_manager, scope_list) ⇒ NameSpace

Create a namespace lookup object using the given task manager and the list of scopes.



1392
1393
1394
1395
# File 'lib/rake.rb', line 1392

def initialize(task_manager, scope_list)
  @task_manager = task_manager
  @scope = scope_list.dup
end

Instance Method Details

#[](name) ⇒ Object

Lookup a task named name in the namespace.



1398
1399
1400
# File 'lib/rake.rb', line 1398

def [](name)
  @task_manager.lookup(name, @scope)
end