Class: Gitlab::BitbucketImport::WikiFormatter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ WikiFormatter

Returns a new instance of WikiFormatter.


8
9
10
# File 'lib/gitlab/bitbucket_import/wiki_formatter.rb', line 8

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project


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

def project
  @project
end

Instance Method Details

#disk_pathObject


12
13
14
# File 'lib/gitlab/bitbucket_import/wiki_formatter.rb', line 12

def disk_path
  project.wiki.disk_path
end

#full_pathObject


16
17
18
# File 'lib/gitlab/bitbucket_import/wiki_formatter.rb', line 16

def full_path
  project.wiki.full_path
end

#import_urlObject


20
21
22
# File 'lib/gitlab/bitbucket_import/wiki_formatter.rb', line 20

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