Exception: QuoteSql::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- QuoteSql::Error
- Defined in:
- lib/quote_sql.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(quote_sql, errors) ⇒ Error
constructor
A new instance of Error.
-
#message ⇒ Object
def inspect super + errors.flat_map { [_1.inspect, _1.backtrace] } end.
- #sql ⇒ Object
Constructor Details
#initialize(quote_sql, errors) ⇒ Error
154 155 156 157 |
# File 'lib/quote_sql.rb', line 154 def initialize(quote_sql, errors) @object = quote_sql @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
159 160 161 |
# File 'lib/quote_sql.rb', line 159 def errors @errors end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
159 160 161 |
# File 'lib/quote_sql.rb', line 159 def object @object end |
Instance Method Details
#message ⇒ Object
def inspect
super + errors.flat_map { [_1.inspect, _1.backtrace] }
end
169 170 171 |
# File 'lib/quote_sql.rb', line 169 def super + %Q@<QuoteSql #{sql} #{@object.errors.inspect}>@ end |
#sql ⇒ Object
161 162 163 |
# File 'lib/quote_sql.rb', line 161 def sql @object.original.inspect end |