Class: SuperDiff::DiffFormatter
- Inherits:
-
Object
- Object
- SuperDiff::DiffFormatter
- Defined in:
- lib/super_diff/diff_formatter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(operations, indent_level:, add_comma: false, extra_classes: []) ⇒ DiffFormatter
constructor
A new instance of DiffFormatter.
Constructor Details
#initialize(operations, indent_level:, add_comma: false, extra_classes: []) ⇒ DiffFormatter
Returns a new instance of DiffFormatter.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/super_diff/diff_formatter.rb', line 7 def initialize( operations, indent_level:, add_comma: false, extra_classes: [] ) @operations = operations @indent_level = indent_level @add_comma = add_comma @extra_classes = extra_classes end |
Class Method Details
.call(*args) ⇒ Object
3 4 5 |
# File 'lib/super_diff/diff_formatter.rb', line 3 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/super_diff/diff_formatter.rb', line 19 def call resolved_class.call( operations, indent_level: indent_level, add_comma: add_comma, ) end |