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-1.30.0 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.57.1 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.54.15 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.53.79 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.53.17 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
files.com-1.0.1 vendor/bundle/ruby/2.5.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/rake-12.0.0/lib/rake/name_space.rb