class Mv::Core::Error

Attributes

column_name[R]
error[R]
options[R]
table_name[R]
validation_type[R]

Public Class Methods

new(opts = {}) click to toggle source
Calls superclass method
# File lib/mv/core/error.rb, line 6
def initialize(opts = {})
  opts = opts.with_indifferent_access

  @table_name = opts[:table_name]
  @column_name = opts[:column_name]
  @validation_type = opts[:validation_type]
  @options = opts[:options]
  @error = opts[:error]

  super [
    @table_name ? "table: '#{@table_name}'" : nil,
    @column_name ? "column: '#{@column_name}'" : nil, 
    @validation_type ? "validation: '#{@validation_type}'" : nil, 
    @options ? "options: '#{@options}'" : nil, 
    @error ? "error: '#{@error}'" : nil, 
  ].compact.join(', ')
end