Sha256: 85b34474b892b01ddf9ee1154456ad6bf975dbeae70b017eb83a4c7e9c659d38
Contents?: true
Size: 399 Bytes
Versions: 1
Compression:
Stored size: 399 Bytes
Contents
class BadRecord include Gorillib::Model field :contents, Whatever, :doc => "The faulty contents; will be truncated at 1000 characters" field :error, Exception, :doc => "Error (optional)" def receive_contents(contents) super contents.to_s[0..1000] end def make(contents, error=nil) hsh = { :contents => contents } hsh[:error] = error if error receive(hsh) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wukong-3.0.0.pre | lib/wukong/bad_record.rb |