Class: SuperDiff::OperationSequences::Base
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- SuperDiff::OperationSequences::Base
- Defined in:
- lib/super_diff/operation_sequences/base.rb
Direct Known Subclasses
ActiveSupport::OperationSequences::HashWithIndifferentAccess, Array, DefaultObject, Hash
Instance Method Summary collapse
-
#pretty_print(pp) ⇒ Object
rubocop:enable Lint/UnusedMethodArgument.
-
#to_diff(indent_level:, add_comma: false, collection_prefix: nil) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
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
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 |