Class: PVN::Diff::DiffSet
- Inherits:
-
Object
- Object
- PVN::Diff::DiffSet
- Includes:
- Logue::Loggable
- Defined in:
- lib/pvn/diff/diffset.rb
Instance Attribute Summary collapse
-
#display_path ⇒ Object
readonly
Returns the value of attribute display_path.
-
#from_lines ⇒ Object
readonly
Returns the value of attribute from_lines.
-
#from_revision ⇒ Object
readonly
Returns the value of attribute from_revision.
-
#to_lines ⇒ Object
readonly
Returns the value of attribute to_lines.
-
#to_revision ⇒ Object
readonly
Returns the value of attribute to_revision.
-
#whitespace ⇒ Object
readonly
Returns the value of attribute whitespace.
Instance Method Summary collapse
-
#initialize(display_path, from_lines, from_revision, to_lines, to_revision, whitespace) ⇒ DiffSet
constructor
A new instance of DiffSet.
- #run_diff ⇒ Object
Constructor Details
#initialize(display_path, from_lines, from_revision, to_lines, to_revision, whitespace) ⇒ DiffSet
Returns a new instance of DiffSet.
19 20 21 22 23 24 25 26 |
# File 'lib/pvn/diff/diffset.rb', line 19 def initialize display_path, from_lines, from_revision, to_lines, to_revision, whitespace @display_path = display_path @from_lines = from_lines @from_revision = from_revision @to_lines = to_lines @to_revision = to_revision @whitespace = whitespace end |
Instance Attribute Details
#display_path ⇒ Object (readonly)
Returns the value of attribute display_path.
12 13 14 |
# File 'lib/pvn/diff/diffset.rb', line 12 def display_path @display_path end |
#from_lines ⇒ Object (readonly)
Returns the value of attribute from_lines.
13 14 15 |
# File 'lib/pvn/diff/diffset.rb', line 13 def from_lines @from_lines end |
#from_revision ⇒ Object (readonly)
Returns the value of attribute from_revision.
14 15 16 |
# File 'lib/pvn/diff/diffset.rb', line 14 def from_revision @from_revision end |
#to_lines ⇒ Object (readonly)
Returns the value of attribute to_lines.
15 16 17 |
# File 'lib/pvn/diff/diffset.rb', line 15 def to_lines @to_lines end |
#to_revision ⇒ Object (readonly)
Returns the value of attribute to_revision.
16 17 18 |
# File 'lib/pvn/diff/diffset.rb', line 16 def to_revision @to_revision end |
#whitespace ⇒ Object (readonly)
Returns the value of attribute whitespace.
17 18 19 |
# File 'lib/pvn/diff/diffset.rb', line 17 def whitespace @whitespace end |
Instance Method Details
#run_diff ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/pvn/diff/diffset.rb', line 28 def run_diff info "display_path: #{@display_path}".color("fafa33") ext = Pathname.new(@display_path).extname info "ext: #{ext}".color("fafa11") Cmd.new @display_path, @from_revision, @to_revision, @from_lines, @to_lines, @whitespace end |