Class: Dandelion::Diff
- Inherits:
-
Object
- Object
- Dandelion::Diff
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/dandelion/diff.rb
Instance Attribute Summary collapse
-
#from_commit ⇒ Object
readonly
Returns the value of attribute from_commit.
-
#to_commit ⇒ Object
readonly
Returns the value of attribute to_commit.
Instance Method Summary collapse
-
#initialize(from_commit, to_commit) ⇒ Diff
constructor
A new instance of Diff.
Constructor Details
#initialize(from_commit, to_commit) ⇒ Diff
Returns a new instance of Diff.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/dandelion/diff.rb', line 13 def initialize(from_commit, to_commit) @from_commit = from_commit @to_commit = to_commit if from_commit.nil? @target = FullDiff.new(to_commit.diff(nil)) else @target = PartialDiff.new(from_commit.diff(to_commit)) end end |
Instance Attribute Details
#from_commit ⇒ Object (readonly)
Returns the value of attribute from_commit.
11 12 13 |
# File 'lib/dandelion/diff.rb', line 11 def from_commit @from_commit end |
#to_commit ⇒ Object (readonly)
Returns the value of attribute to_commit.
11 12 13 |
# File 'lib/dandelion/diff.rb', line 11 def to_commit @to_commit end |