Class: DeepLDiff::Spacing
- Inherits:
-
Object
- Object
- DeepLDiff::Spacing
- Defined in:
- lib/deepl_diff/spacing.rb
Overview
Adds same count leading-trailing spaces left has to the right
Class Method Summary collapse
-
.restore(left, right) ⇒ Object
DeepLDiff::Spacing.restore(“ a ”, “Z”) # => “ Z ”.
Class Method Details
.restore(left, right) ⇒ Object
DeepLDiff::Spacing.restore(“ a ”, “Z”) # => “ Z ”
7 8 9 |
# File 'lib/deepl_diff/spacing.rb', line 7 def restore(left, right) leading(left) + right.strip + trailing(left) end |