Sha256: 9e305c2f33a715ddeab66c970f050fc873e22aefca6f41b1558c07f03c770784

Contents?: true

Size: 433 Bytes

Versions: 18

Compression:

Stored size: 433 Bytes

Contents

require 'yaml'

module AwsEc2
  class Config < Base
    def initialize(options={})
      super
      @path = options[:path] || "#{AwsEc2.root}/config/#{AwsEc2.env}.yml"
    end

    @@data = nil
    def data
      return @@data if @@data
      @@data = YAML.load_file(@path)
    rescue Errno::ENOENT => e
      puts e.message
      puts "The #{@path} does not exist. Please double check that it exists."
      exit
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
aws-ec2-1.4.9 lib/aws_ec2/config.rb
aws-ec2-1.4.8 lib/aws_ec2/config.rb
aws-ec2-1.4.7 lib/aws_ec2/config.rb
aws-ec2-1.4.6 lib/aws_ec2/config.rb
aws-ec2-1.4.5 lib/aws_ec2/config.rb
aws-ec2-1.4.4 lib/aws_ec2/config.rb
aws-ec2-1.4.3 lib/aws_ec2/config.rb
aws-ec2-1.4.2 lib/aws_ec2/config.rb
aws-ec2-1.4.1 lib/aws_ec2/config.rb
aws-ec2-1.4.0 lib/aws_ec2/config.rb
aws-ec2-1.3.2 lib/aws_ec2/config.rb
aws-ec2-1.3.1 lib/aws_ec2/config.rb
aws-ec2-1.3.0 lib/aws_ec2/config.rb
aws-ec2-1.2.2 lib/aws_ec2/config.rb
aws-ec2-1.2.1 lib/aws_ec2/config.rb
aws-ec2-1.2.0 lib/aws_ec2/config.rb
aws-ec2-1.1.0 lib/aws_ec2/config.rb
aws-ec2-1.0.0 lib/aws_ec2/config.rb