Class: SuperDiff::OperationSequences::Base

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/super_diff/operation_sequences/base.rb

Instance Method Summary collapse

Instance Method Details

#pretty_print(pp) ⇒ Object

rubocop:enable Lint/UnusedMethodArgument



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/super_diff/operation_sequences/base.rb', line 10

def pretty_print(pp)
  pp.text "#{self.class.name}.new(["
  pp.group_sub do
    pp.nest(2) do
      pp.breakable
      pp.seplist(self) do |value|
        pp.pp value
      end
    end
  end
  pp.breakable
  pp.text("])")
end

#to_diff(indent_level:, add_comma: false, collection_prefix: nil) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/super_diff/operation_sequences/base.rb', line 5

def to_diff(indent_level:, add_comma: false, collection_prefix: nil)
  raise NotImplementedError
end