Class: BadRecord
Overview
Easily serialize bad records in-band, for later analysis or to discard if neglectable.
You can instantiate this as
success = do_stuff_to record
if ! success
return BadRecord.new("do_stuff_to-failed", record)
end
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#record ⇒ Object
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(errors = '', *record_fields) ⇒ BadRecord
constructor
A new instance of BadRecord.
Constructor Details
#initialize(errors = '', *record_fields) ⇒ BadRecord
Returns a new instance of BadRecord.
15 16 17 |
# File 'lib/wukong/bad_record.rb', line 15 def initialize errors='', *record_fields super errors, record_fields end |