Class: SuperDiff::OperationTrees::Base
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- SuperDiff::OperationTrees::Base
- Extended by:
- ImplementationChecks
- Defined in:
- lib/super_diff/operation_trees/base.rb
Direct Known Subclasses
ActiveSupport::OperationTrees::HashWithIndifferentAccess, Array, DefaultObject, Hash, MultilineString
Class Method Summary collapse
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.
Class Method Details
.applies_to?(_value) ⇒ Boolean
4 5 6 |
# File 'lib/super_diff/operation_trees/base.rb', line 4 def self.applies_to?(_value) unimplemented_class_method! end |
Instance Method Details
#pretty_print(pp) ⇒ Object
rubocop:enable Lint/UnusedMethodArgument
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/super_diff/operation_trees/base.rb', line 16 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
11 12 13 |
# File 'lib/super_diff/operation_trees/base.rb', line 11 def to_diff(indent_level:, add_comma: false, collection_prefix: nil) raise NotImplementedError end |