Sha256: eef6c094193144fd509f595073dd714fc7979d891af9942b6df6579ef943ba5f
Contents?: true
Size: 706 Bytes
Versions: 1
Compression:
Stored size: 706 Bytes
Contents
require 'libxml' require 'openssl' require 'base64' class String def camel_up self.split('_').map(&:capitalize).join('') end end module GoogleApps module Atom include LibXML HASH_FUNCTION = "SHA-1" DOCUMENTS = %w(user export group group_member message_attributes public_key) NAMESPACES = { atom: 'http://www.w3.org/2005/Atom', apps: 'http://schemas.google.com/apps/2006', gd: 'http://schemas.google.com/g/2005' } # The idea is to make document distribution more dynamic. # Might be pointless but it's here for now. DOCUMENTS.each do |doc| eval "def #{doc}\n #{doc.camel_up}.new\nend" module_function doc.to_sym end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
google_apps-0.4.6 | lib/google_apps/atom/atom.rb |