Sha256: 6f1eb9f473c525393c3c6fb262e84f25bf995f92f7d67c03262995e16c9d289c

Contents?: true

Size: 542 Bytes

Versions: 19

Compression:

Stored size: 542 Bytes

Contents

module Linode
  class << self
    if Fog.credentials[:linode_api_key]

      def initialized?
        true
      end

      def [](service)
        @@connections ||= Hash.new do |hash, key|
          credentials = Fog.credentials.reject do |k,v|
            ![:linode_api_key].include?(k)
          end
          hash[key] = case key
          when :linode
            Fog::Linode.new(credentials)
          end
        end
        @@connections[service]
      end

    else

      def initialized?
        false
      end

    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
fog-0.2.30 lib/fog/linode/bin.rb
fog-0.2.28 lib/fog/linode/bin.rb
fog-0.2.27 lib/fog/linode/bin.rb
fog-0.2.26 lib/fog/linode/bin.rb
fog-0.2.25 lib/fog/linode/bin.rb
fog-0.2.24 lib/fog/linode/bin.rb
tecnh-fog-0.2.23.vpc lib/fog/linode/bin.rb
fog-0.2.23 lib/fog/linode/bin.rb
fog-0.2.22 lib/fog/linode/bin.rb
fog-0.2.21 lib/fog/linode/bin.rb
fog-0.2.20 lib/fog/linode/bin.rb
fog-0.2.19 lib/fog/linode/bin.rb
fog-0.2.18 lib/fog/linode/bin.rb
fog-0.2.17 lib/fog/linode/bin.rb
fog-0.2.16 lib/fog/linode/bin.rb
fog-0.2.15 lib/fog/linode/bin.rb
fog-0.2.14 lib/fog/linode/bin.rb
fog-0.2.13 lib/fog/linode/bin.rb
fog-0.2.12 lib/fog/linode/bin.rb