Class: RailsAppGenerator::Diff::CompareInfo
- Inherits:
-
Object
- Object
- RailsAppGenerator::Diff::CompareInfo
- Defined in:
- lib/rails_app_generator/diff/compare_info.rb
Overview
CompareInfo stores LHS and RHS file information in segments
Instance Attribute Summary collapse
-
#diff ⇒ Object
readonly
Returns the value of attribute diff.
-
#lhs_files ⇒ Object
readonly
Returns the value of attribute lhs_files.
-
#lhs_only ⇒ Object
readonly
File segments.
-
#lhs_path ⇒ Object
readonly
Returns the value of attribute lhs_path.
-
#rhs_files ⇒ Object
readonly
Returns the value of attribute rhs_files.
-
#rhs_only ⇒ Object
readonly
Returns the value of attribute rhs_only.
-
#rhs_path ⇒ Object
readonly
Returns the value of attribute rhs_path.
-
#same ⇒ Object
readonly
Returns the value of attribute same.
Instance Method Summary collapse
- #debug ⇒ Object
-
#initialize(lhs_path, lhs_files, rhs_path, rhs_files) ⇒ CompareInfo
constructor
A new instance of CompareInfo.
Constructor Details
#initialize(lhs_path, lhs_files, rhs_path, rhs_files) ⇒ CompareInfo
Returns a new instance of CompareInfo.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 19 def initialize(lhs_path, lhs_files, rhs_path, rhs_files) @lhs_path = lhs_path @lhs_files = lhs_files @rhs_path = rhs_path @rhs_files = rhs_files @lhs_only = [] @rhs_only = [] @diff = [] @same = [] segment_files(lhs_path, lhs_files, rhs_path, rhs_files) end |
Instance Attribute Details
#diff ⇒ Object (readonly)
Returns the value of attribute diff.
16 17 18 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 16 def diff @diff end |
#lhs_files ⇒ Object (readonly)
Returns the value of attribute lhs_files.
8 9 10 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 8 def lhs_files @lhs_files end |
#lhs_only ⇒ Object (readonly)
File segments
14 15 16 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 14 def lhs_only @lhs_only end |
#lhs_path ⇒ Object (readonly)
Returns the value of attribute lhs_path.
7 8 9 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 7 def lhs_path @lhs_path end |
#rhs_files ⇒ Object (readonly)
Returns the value of attribute rhs_files.
11 12 13 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 11 def rhs_files @rhs_files end |
#rhs_only ⇒ Object (readonly)
Returns the value of attribute rhs_only.
15 16 17 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 15 def rhs_only @rhs_only end |
#rhs_path ⇒ Object (readonly)
Returns the value of attribute rhs_path.
10 11 12 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 10 def rhs_path @rhs_path end |
#same ⇒ Object (readonly)
Returns the value of attribute same.
17 18 19 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 17 def same @same end |
Instance Method Details
#debug ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/rails_app_generator/diff/compare_info.rb', line 34 def debug debug_stats debug_files('left only' , lhs_only) debug_files('right only' , rhs_only) debug_files('same' , same) debug_files('diff' , diff) end |