Module: Pra::PullSourceFactory
- Defined in:
- lib/pra/pull_source_factory.rb
Class Method Summary collapse
Class Method Details
.build_pull_source(pull_source_config) ⇒ Object
6 7 8 9 |
# File 'lib/pra/pull_source_factory.rb', line 6 def self.build_pull_source(pull_source_config) klass = map_type_to_klass(pull_source_config["type"]) klass.new(pull_source_config["config"]) end |
.map_type_to_klass(type) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pra/pull_source_factory.rb', line 11 def self.map_type_to_klass(type) case type when 'stash' return StashPullSource when 'github' return GithubPullSource end end |