Class: Bringit::Tag

Inherits:
Ref
  • Object
show all
Defined in:
lib/bringit/tag.rb

Constant Summary

Constants included from EncodingHelper

EncodingHelper::ENCODING_CONFIDENCE_THRESHOLD

Instance Attribute Summary collapse

Attributes inherited from Ref

#dereferenced_target, #name, #target

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Ref

dereference_object, extract_branch_name, name_valid?

Methods included from EncodingHelper

#encode!, #encode_utf8

Constructor Details

#initialize(repository, name, target, message = nil) ⇒ Tag

Returns a new instance of Tag.



9
10
11
12
13
# File 'lib/bringit/tag.rb', line 9

def initialize(repository, name, target, message = nil)
  super(repository, name, target)

  @message = message
end

Instance Attribute Details

#object_shaObject (readonly)

Returns the value of attribute object_sha.



3
4
5
# File 'lib/bringit/tag.rb', line 3

def object_sha
  @object_sha
end

Class Method Details

.find(repository, name) ⇒ Object



5
6
7
# File 'lib/bringit/tag.rb', line 5

def self.find(repository, name)
  repository.tags.find { |tag| tag.name == name }
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/bringit/tag.rb', line 15

def message
  encode! @message
end