Module: BlobLike

Extended by:
ActiveSupport::Concern
Includes:
Gitlab::BlobHelper
Included in:
Ci::ArtifactBlob, SnippetBlob
Defined in:
app/models/concerns/blob_like.rb

Constant Summary

Constants included from Gitlab::BlobHelper

Gitlab::BlobHelper::MEGABYTE

Instance Method Summary collapse

Methods included from Gitlab::BlobHelper

#_mime_type, #binary_mime_type?, #content_type, #detect_encoding, #empty?, #encoded_newlines_re, #encoding, #extname, #image?, #known_extension?, #large?, #lines, #mime_type, #ruby_encoding, #text_in_repo?, #viewable?

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Instance Method Details

#binary_in_repo?Boolean

Returns:

  • (Boolean)

31
32
33
# File 'app/models/concerns/blob_like.rb', line 31

def binary_in_repo?
  false
end

#dataObject


23
24
25
# File 'app/models/concerns/blob_like.rb', line 23

def data
  nil
end

#external_sizeObject


47
48
49
# File 'app/models/concerns/blob_like.rb', line 47

def external_size
  nil
end

#external_storageObject


43
44
45
# File 'app/models/concerns/blob_like.rb', line 43

def external_storage
  nil
end

#idObject

Raises:

  • (NotImplementedError)

7
8
9
# File 'app/models/concerns/blob_like.rb', line 7

def id
  raise NotImplementedError
end

#load_all_data!(repository) ⇒ Object


35
36
37
# File 'app/models/concerns/blob_like.rb', line 35

def load_all_data!(repository)
  # No-op
end

#modeObject


27
28
29
# File 'app/models/concerns/blob_like.rb', line 27

def mode
  nil
end

#nameObject

Raises:

  • (NotImplementedError)

11
12
13
# File 'app/models/concerns/blob_like.rb', line 11

def name
  raise NotImplementedError
end

#pathObject

Raises:

  • (NotImplementedError)

15
16
17
# File 'app/models/concerns/blob_like.rb', line 15

def path
  raise NotImplementedError
end

#sizeObject


19
20
21
# File 'app/models/concerns/blob_like.rb', line 19

def size
  0
end

#truncated?Boolean

Returns:

  • (Boolean)

39
40
41
# File 'app/models/concerns/blob_like.rb', line 39

def truncated?
  false
end