Module: Cerberus::Publisher
- Defined in:
- lib/cerberus/publisher/base.rb,
lib/cerberus/component_lazy_loader.rb
Defined Under Namespace
Classes: Base, Campfire, IRC, Jabber, Mail, RSS, Twitter
Constant Summary collapse
- TYPES =
{ :mail => 'Mail', :jabber => 'Jabber', :irc => 'IRC', :rss => 'RSS', :campfire => 'Campfire', :twitter => 'Twitter' }
Class Method Summary collapse
Class Method Details
.get(type, config) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/cerberus/component_lazy_loader.rb', line 59 def self.get(type, config) class_name = TYPES[type.to_sym] if not class_name class_name = config[:class_name] say "Publisher #{type} not supported" unless class_name require config[:require] else require "cerberus/publisher/#{type}" end const_get(class_name) end |