Sha256: effcb37646d3a31050d7c71ec10c16ad3c87a111e9298cc2a502276ffdfe7aad

Contents?: true

Size: 789 Bytes

Versions: 18

Compression:

Stored size: 789 Bytes

Contents

require 'fog/core/collection'
require 'fog/aws/models/beanstalk/environment'

module Fog
  module AWS
    class ElasticBeanstalk

      class Environments < Fog::Collection
        model Fog::AWS::ElasticBeanstalk::Environment

        def all(options={})
          data = connection.describe_environments(options).body['DescribeEnvironmentsResult']['Environments']
          load(data) # data is an array of attribute hashes
        end

        # Gets an environment given a name.
        #
        def get(environment_name)
          options = { 'EnvironmentNames' => [environment_name] }

          if data = connection.describe_environments(options).body['DescribeEnvironmentsResult']['Environments'].first
            new(data)
          end
        end

      end
    end
  end
end

Version data entries

18 entries across 18 versions & 9 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/aws/models/beanstalk/environments.rb
fog-nirvanix-1.8.1 lib/fog/aws/models/beanstalk/environments.rb
fog-parser-fix-1.6.1 lib/fog/aws/models/beanstalk/environments.rb
fog-test-again-1.6.0 lib/fog/aws/models/beanstalk/environments.rb
fog-parser-fix-1.6.0 lib/fog/aws/models/beanstalk/environments.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/aws/models/beanstalk/environments.rb
fog-sgonyea-1.8.1 lib/fog/aws/models/beanstalk/environments.rb
fog-1.8.0 lib/fog/aws/models/beanstalk/environments.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/aws/models/beanstalk/environments.rb
fog-1.7.0 lib/fog/aws/models/beanstalk/environments.rb
fog-1.6.0 lib/fog/aws/models/beanstalk/environments.rb
fog-1.5.0 lib/fog/aws/models/beanstalk/environments.rb
fog-1.4.0 lib/fog/aws/models/beanstalk/environments.rb
michiels-fog-1.3.1 lib/fog/aws/models/beanstalk/environments.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/models/beanstalk/environments.rb
fog-1.3.1 lib/fog/aws/models/beanstalk/environments.rb
fog-1.3.0 lib/fog/aws/models/beanstalk/environments.rb
fog-1.2.0 lib/fog/aws/models/beanstalk/environments.rb