Class: RailsAppGenerator::Diff::FilePair

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_app_generator/diff/file_pair.rb

Overview

FilePair stores the relative file path, plus the absolute file for both Left and Right site

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, lhs_file: nil, rhs_file: nil) ⇒ FilePair

Returns a new instance of FilePair.



11
12
13
14
15
# File 'lib/rails_app_generator/diff/file_pair.rb', line 11

def initialize(file, lhs_file: nil, rhs_file: nil)
  @file = file
  @lhs_file = lhs_file
  @rhs_file = rhs_file
end

Instance Attribute Details

#fileObject (readonly)

relative file



7
8
9
# File 'lib/rails_app_generator/diff/file_pair.rb', line 7

def file
  @file
end

#lhs_fileObject (readonly)

absolute file for left hand side



8
9
10
# File 'lib/rails_app_generator/diff/file_pair.rb', line 8

def lhs_file
  @lhs_file
end

#rhs_fileObject (readonly)

absolute file for right hand side



9
10
11
# File 'lib/rails_app_generator/diff/file_pair.rb', line 9

def rhs_file
  @rhs_file
end