Class: RepoMgr::Publishers

Inherits:
Object
  • Object
show all
Defined in:
lib/repo_mgr/publishers.rb

Overview

factory loader for RepoMgr::Publisher::Foo objects

Class Method Summary collapse

Class Method Details

.load(publisher, config) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/repo_mgr/publishers.rb', line 8

def self.load(publisher, config)
  @obj ||= {}

  @obj[publisher] ||= Object.const_get(
    "RepoMgr::Publisher::#{publisher.capitalize}"
  ).new(config)

  @obj[publisher]
end