Module: Jazzy::SourceHost

Defined in:
lib/jazzy/source_host.rb

Overview

Deal with different source code repositories

Defined Under Namespace

Classes: BitBucket, GitHub, GitLab

Class Method Summary collapse

Class Method Details

.create(options) ⇒ Object

Factory to create the right source host



7
8
9
10
11
12
13
14
15
# File 'lib/jazzy/source_host.rb', line 7

def self.create(options)
  return unless options.source_host_url || options.source_host_files_url

  case options.source_host
  when :github then GitHub.new
  when :gitlab then GitLab.new
  when :bitbucket then BitBucket.new
  end
end