Sha256: 6e281f16191aaa755236ca0163dc676e15e15b125336482de21af0af6f7fd0d5

Contents?: true

Size: 489 Bytes

Versions: 26

Compression:

Stored size: 489 Bytes

Contents

module Compass::Commands
  module Registry
    def register(name, command_class)
      @commands ||= Hash.new
      @commands[name.to_sym] = command_class
    end
    def get(name)
      @commands ||= Hash.new
      @commands[name.to_sym]
    end
    def command_exists?(name)
      @commands ||= Hash.new
      name && @commands.has_key?(name.to_sym)
    end
    def all
      @commands.keys
    end
    alias_method :[], :get
    alias_method :[]=, :register
  end
  extend Registry
end

Version data entries

26 entries across 25 versions & 3 rubygems

Version Path
compass-0.10.0.rc5 lib/compass/commands/registry.rb
compass-0.10.0.rc4 lib/compass/commands/registry.rb
compass-0.10.0.rc3 lib/compass/commands/registry.rb
compass-0.10.0.rc2 lib/compass/commands/registry.rb
compass-0.10.0.rc1 lib/compass/commands/registry.rb
compass-0.10.0.pre9 lib/compass/commands/registry.rb
compass-0.10.0.pre8 lib/compass/commands/registry.rb
compass-0.10.0.pre7 lib/compass/commands/registry.rb
compass-0.10.0.pre6 lib/compass/commands/registry.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.9.1/gems/compass-0.10.0.pre4/lib/compass/commands/registry.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/compass-0.10.0.pre5/lib/compass/commands/registry.rb
compass-0.10.0.pre5 lib/compass/commands/registry.rb
compass-0.10.0.pre4 lib/compass/commands/registry.rb
compass-0.10.0.pre3 lib/compass/commands/registry.rb
middleman-0.12.2 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/registry.rb
middleman-0.12.1 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/registry.rb
middleman-0.12.0.pre3 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/registry.rb
middleman-0.12.0.pre2 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/commands/registry.rb
compass-0.10.0.pre2 lib/compass/commands/registry.rb
compass-0.10.0.pre1 lib/compass/commands/registry.rb