/lib/gitpusher/repo/factory.rb
Ruby | 14 lines | 14 code | 0 blank | 0 comment | 0 complexity | 7d33c7fc1470dc42d73567777530ce50 MD5 | raw file
- module GitPusher
- module Repo
- class Factory
- def self.create(config)
- case config[:type]
- when /github/i then GitPusher::Repo::GitHub.new(config)
- when /bitbucket/i then GitPusher::Repo::BitBucket.new(config)
- else
- raise "unknown issue tracker type : #{its_type}"
- end
- end
- end
- end
- end