Class: SuperDiff::DiffFormatters::Base
- Inherits:
-
Object
- Object
- SuperDiff::DiffFormatters::Base
show all
- Defined in:
- lib/super_diff/diff_formatters/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(operations, indent_level:, collection_prefix: "", add_comma: false) ⇒ Base
Returns a new instance of Base.
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/super_diff/diff_formatters/base.rb', line 12
def initialize(
operations,
indent_level:,
collection_prefix: "",
add_comma: false
)
@operations = operations
@indent_level = indent_level
@collection_prefix = collection_prefix
@add_comma = add_comma
end
|
Class Method Details
.applies_to?(_operations) ⇒ Boolean
4
5
6
|
# File 'lib/super_diff/diff_formatters/base.rb', line 4
def self.applies_to?(_operations)
raise NotImplementedError
end
|
.call(*args) ⇒ Object
8
9
10
|
# File 'lib/super_diff/diff_formatters/base.rb', line 8
def self.call(*args)
new(*args).call
end
|
Instance Method Details
24
25
26
|
# File 'lib/super_diff/diff_formatters/base.rb', line 24
def call
raise NotImplementedError
end
|