Module: Compass::Commands::Registry

Included in:
Compass::Commands
Defined in:
lib/compass/commands/registry.rb

Instance Method Summary collapse

Instance Method Details

#allObject



15
16
17
# File 'lib/compass/commands/registry.rb', line 15

def all
  @commands.keys
end

#command_exists?(name) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/compass/commands/registry.rb', line 11

def command_exists?(name)
  @commands ||= Hash.new
  name && @commands.has_key?(name.to_sym)
end

#get(name) ⇒ Object Also known as: []



7
8
9
10
# File 'lib/compass/commands/registry.rb', line 7

def get(name)
  @commands ||= Hash.new
  @commands[name.to_sym]
end

#register(name, command_class) ⇒ Object Also known as: []=



3
4
5
6
# File 'lib/compass/commands/registry.rb', line 3

def register(name, command_class)
  @commands ||= Hash.new
  @commands[name.to_sym] = command_class
end