class MooTool::ControllerBase

Public Class Methods

command(command = nil) click to toggle source
# File lib/mootool/controller_base.rb, line 23
def command(command = nil)
  @command = command if command
  @command
end
description(description) click to toggle source
# File lib/mootool/controller_base.rb, line 28
def description(description)
  @description = description
end
for_controller(name) click to toggle source
# File lib/mootool/controller_base.rb, line 13
def self.for_controller(name)
  @@controllers.find { |c| c.command == name }
end
inherited(child) click to toggle source
# File lib/mootool/controller_base.rb, line 17
def self.inherited(child)
  @@controllers ||= []
  @@controllers << child
end
load_all() click to toggle source
# File lib/mootool/controller_base.rb, line 7
def self.load_all
  Dir.glob(File.join(CONTROLLERS_PATH, '*')).each do |file|
    require file
  end
end