Sha256: 1299552be35913b13186323012a0547b071534cb311cc0e514b604d979a02266

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

module PositiveBasicSupport::Checker::ErrorFactory

  # エラーメッセージの書式を整えるためのメソッド
  # @param str [String] エラーメッセージの基本部分
  # @return [String]
  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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
positive_basic_support-0.2.0 lib/positive_basic_support/checker/error_factory.rb