Module: Whaler::Command::ClassMethods

Included in:
Whaler::Command
Defined in:
lib/whaler/command.rb

Instance Method Summary collapse

Instance Method Details

#commandsObject



10
11
12
# File 'lib/whaler/command.rb', line 10

def commands
  @@comands ||= []
end

#loadObject



4
5
6
7
8
# File 'lib/whaler/command.rb', line 4

def load
  Dir[File.join(File.dirname(__FILE__), "command", "*.rb")].each do |file|
    require file
  end
end

#register(&block) ⇒ Object



14
15
16
# File 'lib/whaler/command.rb', line 14

def register(&block)
  commands.push(block)
end