Sha256: b7325b4f575824d4c4ed769bb9a0de105c81a834c06009c785cc87a8ad17f3ef

Contents?: true

Size: 711 Bytes

Versions: 64

Compression:

Stored size: 711 Bytes

Contents

require 'aws-sdk'
require 'contracts'
require_relative 'support/rate_limit_handler'
require_relative '../config'

module Cloudstrap
  module Amazon
    class Service
      include ::Contracts::Core
      include ::Contracts::Builtin
      include Support::RateLimitHandler

      Contract Maybe[Config] => Service
      def initialize(config = nil)
        @config = config
        self
      end

      Contract None => Aws::Client
      def client
        raise NotImplementedError
      end

      Contract None => Aws::Client
      def api
        @api ||= client.new region: config.region
      end

      Contract None => Config
      def config
        @config ||= Config.new
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
cloudstrap-0.51.1.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.50.1.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.12.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.11.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.10.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.8.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.4.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.2.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.1.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.49.0.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.48.15.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.48.2.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.48.0.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.47.8.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.47.7.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.47.2.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.47.0.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.46.7.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.46.4.pre lib/cloudstrap/amazon/service.rb
cloudstrap-0.46.3.pre lib/cloudstrap/amazon/service.rb