Class: Docman::TargetChecker

Inherits:
Command
  • Object
show all
Defined in:
lib/docman/commands/target_checker.rb

Direct Known Subclasses

SSHTargetChecker

Constant Summary collapse

@@checkers =
{}

Instance Attribute Summary

Attributes inherited from Command

#type

Class Method Summary collapse

Methods inherited from Command

#add_action, #add_actions, #config, #describe, #execute, #initialize, #perform, #prefix, register_command, #replace_placeholder, #run_actions, #run_with_hooks

Methods included from Logging

#log, logger, #logger, #prefix, #properties_info, #with_logging

Constructor Details

This class inherits a constructor from Docman::Command

Class Method Details

.create(params = nil, context = nil) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/docman/commands/target_checker.rb', line 8

def self.create(params = nil, context = nil)
  c = @@checkers[params['handler']]
  if c
    c.new(params, context)
  else
    raise "Bad checker type: #{type}"
  end
end

.register_checker(name) ⇒ Object



17
18
19
# File 'lib/docman/commands/target_checker.rb', line 17

def self.register_checker(name)
  @@checkers[name] = self
end