Module: RubyCqrs::Data::Encodable

Included in:
RubyCqrs::Domain::Event, RubyCqrs::Domain::Snapshot
Defined in:
lib/ruby_cqrs/data/serialization.rb

Instance Method Summary collapse

Instance Method Details

#try_encodeObject



11
12
13
14
# File 'lib/ruby_cqrs/data/serialization.rb', line 11

def try_encode
  return self.encode.to_s if self.is_a? Beefcake::Message
  raise ObjectNotEncodableError
end