Class: Gitlab::Git::Tag
Constant Summary
Constants included from EncodingHelper
EncodingHelper::ENCODING_CONFIDENCE_THRESHOLD
Instance Attribute Summary collapse
-
#object_sha ⇒ Object
readonly
Returns the value of attribute object_sha.
Attributes inherited from Ref
Instance Method Summary collapse
-
#initialize(repository, object, name, target, message = nil) ⇒ Tag
constructor
A new instance of Tag.
- #message ⇒ Object
Methods inherited from Ref
dereference_object, extract_branch_name
Methods included from EncodingHelper
Constructor Details
#initialize(repository, object, name, target, message = nil) ⇒ Tag
Returns a new instance of Tag.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/gitlab_git/tag.rb', line 6 def initialize(repository, object, name, target, = nil) super(repository, name, target) @object_sha = if object.respond_to?(:oid) object.oid elsif object.respond_to?(:name) object.name elsif object.is_a? String object else nil end @message = end |
Instance Attribute Details
#object_sha ⇒ Object (readonly)
Returns the value of attribute object_sha.
4 5 6 |
# File 'lib/gitlab_git/tag.rb', line 4 def object_sha @object_sha end |
Instance Method Details
#message ⇒ Object
20 21 22 |
# File 'lib/gitlab_git/tag.rb', line 20 def encode! @message end |