Class: Gitlab::Git::WikiFile
- Inherits:
-
Object
- Object
- Gitlab::Git::WikiFile
- Defined in:
- lib/gitlab/git/wiki_file.rb
Instance Attribute Summary collapse
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
Instance Method Summary collapse
-
#initialize(blob) ⇒ WikiFile
constructor
A new instance of WikiFile.
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_type ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/gitlab/git/wiki_file.rb', line 6 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/gitlab/git/wiki_file.rb', line 6 def path @path end |
#raw_data ⇒ Object (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 |