diff options
Diffstat (limited to 'vendor/gems/ipynbdiff/lib/diff.rb')
-rw-r--r-- | vendor/gems/ipynbdiff/lib/diff.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/gems/ipynbdiff/lib/diff.rb b/vendor/gems/ipynbdiff/lib/diff.rb new file mode 100644 index 00000000000..3554ac55d99 --- /dev/null +++ b/vendor/gems/ipynbdiff/lib/diff.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +# Custom differ for Jupyter Notebooks +module IpynbDiff + require 'delegate' + + # The result of a diff object + class Diff < SimpleDelegator + require 'diffy' + + attr_reader :from, :to + + def initialize(from, to, diffy_opts) + super(Diffy::Diff.new(from.as_text, to.as_text, **diffy_opts)) + + @from = from + @to = to + end + end +end |