Class: Gitlab::Git::WikiFile

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/git/wiki_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(blob) ⇒ WikiFile

Returns a new instance of WikiFile.



8
9
10
11
12
13
# File 'lib/gitlab/git/wiki_file.rb', line 8

def initialize(blob)
  @mime_type = blob.mime_type
  @raw_data = blob.data
  @name = File.basename(blob.name)
  @path = blob.path
end

Instance Attribute Details

#mime_typeObject (readonly)

Returns the value of attribute mime_type.



6
7
8
# File 'lib/gitlab/git/wiki_file.rb', line 6

def mime_type
  @mime_type
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/gitlab/git/wiki_file.rb', line 6

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/gitlab/git/wiki_file.rb', line 6

def path
  @path
end

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



6
7
8
# File 'lib/gitlab/git/wiki_file.rb', line 6

def raw_data
  @raw_data
end