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