Sha256: 5903bf5e4bbe3ed0d60ee3ac5217ad25488a15de384bf403ad06ebf7f91a7990

Contents?: true

Size: 470 Bytes

Versions: 9

Compression:

Stored size: 470 Bytes

Contents

require "google_apis/api/base/class_methods"
require "google_apis/api/base/instance_methods"
require "google_apis/api/base/resource"

module Google
end

module GoogleApis
  class Api
    module Base

      def self.extended(base)
        name = base.to_s.demodulize
        Google.const_set name, base

        base.instance_variable_set :@name, "Google::#{name}"
        base.extend ClassMethods
        base.send :include, InstanceMethods
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
google-apis-0.2.0 lib/google_apis/api/base.rb
google-apis-0.1.7 lib/google_apis/api/base.rb
google-apis-0.1.6 lib/google_apis/api/base.rb
google-apis-0.1.5 lib/google_apis/api/base.rb
google-apis-0.1.4 lib/google_apis/api/base.rb
google-apis-0.1.3 lib/google_apis/api/base.rb
google-apis-0.1.2 lib/google_apis/api/base.rb
google-apis-0.1.1 lib/google_apis/api/base.rb
google-apis-0.1.0 lib/google_apis/api/base.rb