Class: RJGit::Note
- Inherits:
-
Object
- Object
- RJGit::Note
- Defined in:
- lib/note.rb
Constant Summary collapse
- DEFAULT_REF =
"refs/notes/commits"
Instance Attribute Summary collapse
-
#annotates ⇒ Object
readonly
Returns the value of attribute annotates.
-
#jnote ⇒ Object
readonly
Returns the value of attribute jnote.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(repository, note) ⇒ Note
constructor
A new instance of Note.
- #to_s ⇒ Object
Constructor Details
#initialize(repository, note) ⇒ Note
Returns a new instance of Note.
7 8 9 10 11 12 |
# File 'lib/note.rb', line 7 def initialize(repository, note) @jrepo = RJGit.repository_type(repository) @jnote = RJGit.note_type(note) @message = @jrepo.open(@jnote.getData()).get_bytes.to_a.pack('c*').force_encoding('UTF-8') @annotates = @jnote.to_s[5..44] end |
Instance Attribute Details
#annotates ⇒ Object (readonly)
Returns the value of attribute annotates.
4 5 6 |
# File 'lib/note.rb', line 4 def annotates @annotates end |
#jnote ⇒ Object (readonly)
Returns the value of attribute jnote.
4 5 6 |
# File 'lib/note.rb', line 4 def jnote @jnote end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/note.rb', line 4 def @message end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/note.rb', line 14 def to_s @message end |