Class: Git::StreamFileModify

Inherits:
Object
  • Object
show all
Defined in:
lib/git/stream.rb

Overview

This class is used in the filemodify change on the commit stream At this time only the inline mode data stream is supported

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository_path, data) ⇒ StreamFileModify

Returns a new instance of StreamFileModify.



87
88
89
90
91
# File 'lib/git/stream.rb', line 87

def initialize(repository_path, data)
  @mode = 100644
  @repository_path = repository_path
  @inline_data = data
end

Instance Attribute Details

#inline_dataObject

Returns the value of attribute inline_data.



85
86
87
# File 'lib/git/stream.rb', line 85

def inline_data
  @inline_data
end

#modeObject

Returns the value of attribute mode.



85
86
87
# File 'lib/git/stream.rb', line 85

def mode
  @mode
end

#repository_pathObject

Returns the value of attribute repository_path.



85
86
87
# File 'lib/git/stream.rb', line 85

def repository_path
  @repository_path
end

Instance Method Details

#to_sObject



93
94
95
# File 'lib/git/stream.rb', line 93

def to_s
  "M #{mode} inline #{repository_path}\n#{StreamData.emit_inline_data(inline_data)}"
end