class MooTool::Command

Attributes

action[R]
controller[R]
file[R]
output_format[R]
remain[R]

Public Class Methods

new(file, _output_format, controller, action, remain) click to toggle source
# File lib/mootool/command.rb, line 11
def initialize(file, _output_format, controller, action, remain)
  @file = file
  @controller = controller
  @output_format = :human
  @remain = remain
  @action = action
end
parse(args) click to toggle source
# File lib/mootool/command.rb, line 7
def self.parse(args)
  Command.new args[2], :human, args[0], args[1], args[3..]
end

Public Instance Methods

run!() click to toggle source
# File lib/mootool/command.rb, line 19
def run!
  MooTool::ControllerBase.load_all

  controller = MooTool::ControllerBase.for_controller @controller
  controller.new.send @action, self, @remain
end