Class: Gitlab::GithubImport::WikiFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/github_import/wiki_formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ WikiFormatter

Returns a new instance of WikiFormatter


6
7
8
# File 'lib/gitlab/github_import/wiki_formatter.rb', line 6

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project


4
5
6
# File 'lib/gitlab/github_import/wiki_formatter.rb', line 4

def project
  @project
end

Instance Method Details

#import_urlObject


14
15
16
# File 'lib/gitlab/github_import/wiki_formatter.rb', line 14

def import_url
  project.import_url.sub(/\.git\z/, ".wiki.git")
end

#path_with_namespaceObject


10
11
12
# File 'lib/gitlab/github_import/wiki_formatter.rb', line 10

def path_with_namespace
  "#{project.path_with_namespace}.wiki"
end