Class: Docman::Taggers::Tagger
- Defined in:
- lib/docman/taggers/tagger.rb
Direct Known Subclasses
Constant Summary collapse
- @@taggers =
{}
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
-
.create(params, context = nil, caller = nil) ⇒ Object
todo: docroot config in separate repos for projects.
- .register_tagger(name) ⇒ Object
Instance Method Summary collapse
-
#initialize(params, context = nil, caller = nil, type = nil) ⇒ Tagger
constructor
A new instance of Tagger.
Methods inherited from Command
#add_action, #add_actions, #config, #describe, #execute, #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
#initialize(params, context = nil, caller = nil, type = nil) ⇒ Tagger
Returns a new instance of Tagger.
22 23 24 |
# File 'lib/docman/taggers/tagger.rb', line 22 def initialize(params, context = nil, caller = nil, type = nil) super(params, context, caller, type) end |
Class Method Details
.create(params, context = nil, caller = nil) ⇒ Object
todo: docroot config in separate repos for projects
9 10 11 12 13 14 15 16 |
# File 'lib/docman/taggers/tagger.rb', line 9 def self.create(params, context = nil, caller = nil) c = @@taggers[params['handler']] if c c.new(params, context, caller, 'tagger') else raise "Bad tagger type: #{type}" end end |
.register_tagger(name) ⇒ Object
18 19 20 |
# File 'lib/docman/taggers/tagger.rb', line 18 def self.register_tagger(name) @@taggers[name] = self end |