Sha256: 75a261adfb929fc3b67710eb7fbbdf624aa4fe0b74a360b2a41c50432093d4fd

Contents?: true

Size: 1.03 KB

Versions: 11

Compression:

Stored size: 1.03 KB

Contents

module Fog
  module Vcloud
    module Extension
      include Fog::Service

      @versions = []

      def self.extended(other)
        other.module_eval <<-EOS,__FILE__,__LINE__
          module #{other}::Real
            extend Fog::Vcloud::Generators
          end
          module #{other}::Mock
          end
          module #{other}::Versions
            SUPPORTED = @versions
          end
          def self.extended(klass)
            unless @required
              models.each do |model|
                require File.join(@model_path, model.to_s)
              end
              requests.each do |request|
                require File.join(@request_path, request.to_s)
              end
              @required = true
            end
            if Fog.mocking?
              klass.extend #{other}::Real
              klass.extend #{other}::Mock
            else
              klass.extend #{other}::Real
            end
          end
        EOS
      end

      def versions(*args)
        @versions = args
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fog-0.2.11 lib/fog/vcloud/extension.rb
fog-0.2.10 lib/fog/vcloud/extension.rb
fog-0.2.9 lib/fog/vcloud/extension.rb
fog-0.2.8 lib/fog/vcloud/extension.rb
fog-0.2.7 lib/fog/vcloud/extension.rb
fog-0.2.6 lib/fog/vcloud/extension.rb
fog-0.2.5 lib/fog/vcloud/extension.rb
fog-0.2.4 lib/fog/vcloud/extension.rb
fog-0.2.3 lib/fog/vcloud/extension.rb
fog-0.2.2 lib/fog/vcloud/extension.rb
fog-0.2.1 lib/fog/vcloud/extension.rb