Class: FlexValidations::IndentedString Private
- Inherits:
-
Object
- Object
- FlexValidations::IndentedString
- Defined in:
- lib/flex_validations.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(original, level: 2, indentation: ' ') ⇒ IndentedString
constructor
private
A new instance of IndentedString.
- #to_s ⇒ Object private
Constructor Details
#initialize(original, level: 2, indentation: ' ') ⇒ IndentedString
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of IndentedString.
75 76 77 78 79 |
# File 'lib/flex_validations.rb', line 75 def initialize(original, level: 2, indentation: ' ') @original = original @level = level @indentation = indentation end |
Instance Method Details
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
81 82 83 84 85 |
# File 'lib/flex_validations.rb', line 81 def to_s @original.to_s.lines.map do |line| "#{@indentation * @level}#{line}" end.join('') end |