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
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/lib/rake/name_space.rb
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/rake-12.0.0/lib/rake/name_space.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/rake-12.0.0/lib/rake/name_space.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/rake-12.0.0/lib/rake/name_space.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/rake-12.0.0/lib/rake/name_space.rb
ruby-compiler-0.1.1 vendor/ruby/gems/rake-12.0.0/lib/rake/name_space.rb
rake-12.0.0 lib/rake/name_space.rb
rake-12.0.0.beta1 lib/rake/name_space.rb