Skip to content

Instantly share code, notes, and snippets.

@pewniak747
Created September 10, 2014 08:08
Show Gist options
  • Save pewniak747/e6f8bccec803959a3c32 to your computer and use it in GitHub Desktop.
Save pewniak747/e6f8bccec803959a3c32 to your computer and use it in GitHub Desktop.
Success = Struct.new(:data) do
def success?
true
end
end
Error = Struct.new(:error, :code, :details) do
def error_message
error.to_s
end
def success?
false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment