Sha256: a36f54921ffb9ec964c6eb30b1792b2d13afcae99f7c5ce11733043610176dfd

Contents?: true

Size: 672 Bytes

Versions: 90

Compression:

Stored size: 672 Bytes

Contents

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

class Rake::NameSpace

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

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

  ##
  # Lookup a task named +name+ in the namespace.

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

  ##
  # The scope of the namespace (a LinkedList)

  def scope
    @scope.dup
  end

  ##
  # Return the list of tasks defined in this and nested namespaces.

  def tasks
    @task_manager.tasks_in_scope(@scope)
  end

end

Version data entries

90 entries across 83 versions & 19 rubygems

Version Path
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/rake-12.0.0/lib/rake/name_space.rb
talon_one-2.0.0 vendor/bundle/ruby/2.7.0/gems/rake-12.0.0/lib/rake/name_space.rb
talon_one-2.0.0 vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.13 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.49.9 vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.44.4 vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/rake-12.0.0/lib/rake/name_space.rb