Skip to content

Instantly share code, notes, and snippets.

@guiocavalcanti
Created September 13, 2013 18:52
Show Gist options
  • Save guiocavalcanti/6554594 to your computer and use it in GitHub Desktop.
Save guiocavalcanti/6554594 to your computer and use it in GitHub Desktop.
class UserBuilder < Untied::Consumer::Observer
observe :user, :from => "social-network"
def build(attrs)
LeanUser.new(external_id: attrs[:id], name: attrs[:first_name])
end
alias_method :after_create, :build
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment