Class: RailsAppGenerator::Diff::OpenInEditor
- Inherits:
-
Object
- Object
- RailsAppGenerator::Diff::OpenInEditor
- Defined in:
- lib/rails_app_generator/diff/open_in_editor.rb
Overview
Diff Report
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#open_different ⇒ Object
readonly
Returns the value of attribute open_different.
-
#open_left_only ⇒ Object
readonly
Returns the value of attribute open_left_only.
-
#open_right_only ⇒ Object
readonly
Returns the value of attribute open_right_only.
-
#open_same ⇒ Object
readonly
Returns the value of attribute open_same.
Instance Method Summary collapse
-
#initialize(compare_info, **opts) ⇒ OpenInEditor
constructor
A new instance of OpenInEditor.
- #open ⇒ Object
Constructor Details
#initialize(compare_info, **opts) ⇒ OpenInEditor
Returns a new instance of OpenInEditor.
14 15 16 17 18 19 20 21 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 14 def initialize(compare_info, **opts) @info = compare_info @open_left_only = opts[:open_left_only].nil? ? false : opts[:open_left_only] @open_right_only = opts[:open_right_only].nil? ? false : opts[:open_right_only] @open_same = opts[:open_same].nil? ? false : opts[:open_same] @open_different = opts[:open_different].nil? ? true : opts[:open_different] end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
7 8 9 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 7 def info @info end |
#open_different ⇒ Object (readonly)
Returns the value of attribute open_different.
12 13 14 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 12 def open_different @open_different end |
#open_left_only ⇒ Object (readonly)
Returns the value of attribute open_left_only.
9 10 11 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 9 def open_left_only @open_left_only end |
#open_right_only ⇒ Object (readonly)
Returns the value of attribute open_right_only.
10 11 12 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 10 def open_right_only @open_right_only end |
#open_same ⇒ Object (readonly)
Returns the value of attribute open_same.
11 12 13 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 11 def open_same @open_same end |
Instance Method Details
#open ⇒ Object
23 24 25 26 27 28 |
# File 'lib/rails_app_generator/diff/open_in_editor.rb', line 23 def open open_files(info.lhs_only) if open_left_only open_files(info.rhs_only) if open_right_only open_files(info.same) if open_same open_files(info.diff) if open_different end |