module FireAndForget::Command

Constants

SEPARATOR

Public Class Methods

allowed?(cmd) click to toggle source
# File lib/fire_and_forget/command.rb, line 10
def self.allowed?(cmd)
  allowed_commands.include?(cmd.class)
end
allowed_commands() click to toggle source
# File lib/fire_and_forget/command.rb, line 14
def self.allowed_commands
  @allowed_commands ||= self.constants.map { |c| self.const_get(c) }.select do |k|
    k.respond_to?(:ancestors) && k.ancestors.include?(CommandBase)
  end
end
load(command) click to toggle source
# File lib/fire_and_forget/command.rb, line 6
def self.load(command)
  Marshal.load(command)
end