Module: PositiveBasicSupport::Checker::ErrorFactory
- Defined in:
- lib/positive_basic_support/checker/error_factory.rb
Class Method Summary collapse
-
.change_paragraph_and_indent(str, indent: 4) ⇒ String
エラーメッセージの書式を整えるためのメソッド.
Class Method Details
.change_paragraph_and_indent(str, indent: 4) ⇒ String
エラーメッセージの書式を整えるためのメソッド
6 7 8 9 10 11 12 |
# File 'lib/positive_basic_support/checker/error_factory.rb', line 6 def self.change_paragraph_and_indent( str , indent: 4 ) prefix = "\n" + " " * indent unless str.string? raise prefix + "The variable \'str\' should be an instance of \'String Class\'." end raise prefix + str end |