Skip to content

Instantly share code, notes, and snippets.

@jmeirow
Created July 4, 2013 14:53
Show Gist options
  • Save jmeirow/5928436 to your computer and use it in GitHub Desktop.
Save jmeirow/5928436 to your computer and use it in GitHub Desktop.
aggregate pointer
class AggregatePointer < Hash
attr_accessor :aggregate_type, :aggregate_id
def initialize aggregate_type, aggregate_id
@aggregate_type = aggregate_type
@aggregate_id = aggregate_id
self['aggregate_type'] = aggregate_type
self['aggregate_id'] = aggregate_id
self['class_name'] = 'AggregatePointer'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment