Class: RailsAppGenerator::Diff::Report
- Inherits:
-
Object
- Object
- RailsAppGenerator::Diff::Report
- Defined in:
- lib/rails_app_generator/diff/report.rb
Overview
Diff Report
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#show_different ⇒ Object
readonly
Returns the value of attribute show_different.
-
#show_left_only ⇒ Object
readonly
Returns the value of attribute show_left_only.
-
#show_right_only ⇒ Object
readonly
Returns the value of attribute show_right_only.
-
#show_same ⇒ Object
readonly
Returns the value of attribute show_same.
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(compare_info, **opts) ⇒ Report
constructor
A new instance of Report.
Constructor Details
#initialize(compare_info, **opts) ⇒ Report
Returns a new instance of Report.
14 15 16 17 18 19 20 21 |
# File 'lib/rails_app_generator/diff/report.rb', line 14 def initialize(compare_info, **opts) @info = compare_info @show_left_only = opts[:show_left_only].nil? ? true : opts[:show_left_only] @show_right_only = opts[:show_right_only].nil? ? true : opts[:show_right_only] @show_same = opts[:show_same].nil? ? false : opts[:show_same] @show_different = opts[:show_different].nil? ? true : opts[:show_different] end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
7 8 9 |
# File 'lib/rails_app_generator/diff/report.rb', line 7 def info @info end |
#show_different ⇒ Object (readonly)
Returns the value of attribute show_different.
12 13 14 |
# File 'lib/rails_app_generator/diff/report.rb', line 12 def show_different @show_different end |
#show_left_only ⇒ Object (readonly)
Returns the value of attribute show_left_only.
9 10 11 |
# File 'lib/rails_app_generator/diff/report.rb', line 9 def show_left_only @show_left_only end |
#show_right_only ⇒ Object (readonly)
Returns the value of attribute show_right_only.
10 11 12 |
# File 'lib/rails_app_generator/diff/report.rb', line 10 def show_right_only @show_right_only end |
#show_same ⇒ Object (readonly)
Returns the value of attribute show_same.
11 12 13 |
# File 'lib/rails_app_generator/diff/report.rb', line 11 def show_same @show_same end |
Instance Method Details
#display ⇒ Object
23 24 25 26 27 28 |
# File 'lib/rails_app_generator/diff/report.rb', line 23 def display display_files('Files only in source folder' , info.lhs_only) if show_left_only display_files('Files only in target folder' , info.rhs_only) if show_right_only display_files('Files in both folders' , info.same) if show_same display_files('Files that are different' , info.diff) if show_different end |