Sha256: 053cfb3365df167c1b68d7fdeb559ed0d3d280b3c2189cf79c554474f4507481

Contents?: true

Size: 956 Bytes

Versions: 13

Compression:

Stored size: 956 Bytes

Contents

# ===========================================================================
# Project:   Abbot - SproutCore Build Tools
# Copyright: ©2009 Apple, Inc.
#            portions copyright @2006-2009 Sprout Systems, Inc.
#            and contributors
# ===========================================================================

module SC
  
  # The NameSpace class will lookup task names in the the scope
  # defined by a +namespace+ command.  Borrowed from Rake 0.8.3
  #
  class 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

    # Return the list of tasks defined in this namespace.
    def tasks
      @task_manager.tasks
    end
  end # NameSpace
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.0.20090408130025 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.0.20090416161445 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.0.20090720093355 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.0.20090720202429 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.0.20090721125122 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.126 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.20090721145236 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.20090721145251 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.20090721145280 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.20090721145281 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.20090721145282 lib/sproutcore/buildfile/namespace.rb
sproutit-sproutcore-1.0.203 lib/sproutcore/buildfile/namespace.rb