class Reading::AppError
Public Class Methods
new(msg = nil, label: "Error:")
click to toggle source
Calls superclass method
# File lib/reading/csv/errors.rb, line 11 def initialize(msg = nil, label: "Error:") super(color.call(label) + space_before?(msg) + (msg || "")) end
Public Instance Methods
show()
click to toggle source
# File lib/reading/csv/errors.rb, line 17 def show puts self end
Protected Instance Methods
color()
click to toggle source
# File lib/reading/csv/errors.rb, line 27 def color Colors.bright_red.bold.detach end
space_before?(msg)
click to toggle source
# File lib/reading/csv/errors.rb, line 23 def space_before?(msg) msg.nil? ? "" : " " end