Exception: Mv::Core::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Mv::Core::Error
- Defined in:
- lib/mv/core/error.rb
Instance Attribute Summary collapse
-
#column_name ⇒ Object
readonly
Returns the value of attribute column_name.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
-
#validation_type ⇒ Object
readonly
Returns the value of attribute validation_type.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(opts = {}) ⇒ Error
Returns a new instance of Error.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# 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 |
Instance Attribute Details
#column_name ⇒ Object (readonly)
Returns the value of attribute column_name.
4 5 6 |
# File 'lib/mv/core/error.rb', line 4 def column_name @column_name end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/mv/core/error.rb', line 4 def error @error end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/mv/core/error.rb', line 4 def @options end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
4 5 6 |
# File 'lib/mv/core/error.rb', line 4 def table_name @table_name end |
#validation_type ⇒ Object (readonly)
Returns the value of attribute validation_type.
4 5 6 |
# File 'lib/mv/core/error.rb', line 4 def validation_type @validation_type end |